[pygtk] syntax coloring

1999-06-09 Thread Alexei Gilchrist

Hi,

please excuse these very basic questions ...

How do I define a GdkColor? If I use  colour_alloc
it says "colour_alloc deprecated.  Use GdkColormap.alloc"
which I can't find anywhere.

is there a neat way of changing the color of a piece of
text in GtkText, other than deleting it and re-inserting
it?


cheers,

Alexei
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]



Re: [pygtk] syntax coloring

1999-06-09 Thread James Henstridge

You get a GdkColormap object with the get_colormap() method of a widget.
From there you can call the colourmap's alloc method in one of two ways:
  colormap.alloc('blue')
  colormap.alloc(0, 0, 0x)

As for the GtkText widget, you have to delete some text and reinsert it to
change its colour.  It is not a very flexible widget.

James.

--
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/


On Thu, 10 Jun 1999, Alexei Gilchrist wrote:

 Hi,
 
 please excuse these very basic questions ...
 
 How do I define a GdkColor? If I use  colour_alloc
 it says "colour_alloc deprecated.  Use GdkColormap.alloc"
 which I can't find anywhere.
 
 is there a neat way of changing the color of a piece of
 text in GtkText, other than deleting it and re-inserting
 it?
 
 
 cheers,
 
 Alexei
 To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
 

To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]