TESetStyle problem

[email protected] (Alan Fry) Wed, 9 May 2001 21:00:53 +0100
Newsgroups perl.macperl.toolbox
Message-ID <p05010400b71f4d168b15@[158.152.146.73]>
IM leads me to believe that to set a text style in TextEdit you call 
TESetStyle(TESetStyle MODE, NEWSTYLE, FREDRAW, HTE).

'NEWSTYLE', it seems, should be a 'record':

         short	   tsFont	(font ID)
	short (?)  tsFace	(font face, 'bold' etc. -- presumably a short?)
	short	   tsSize	(font size in points)
         ????	   RGB		(absolute RGB color)

Now what, for starters, is meant by "_absolute_ RGB Color"?

I have tried this in a hopeful sort of a way...

         my $col = RGBColor->new(0xFFFF, 0, 0);

	my $ts  = { tsFont   =>  20,
                     tsFace   =>   1,
                     tsSize   =>  24,
                    tsColor   =>  $col };

         my $text_style = bless $ts, "TextStyle";

         TESetStyle(doAll, $text_style, 1, $hte);

...to no effect at all. As far as I can see it does absolutely nothing.

Anyone any ideas?

Alan Fry