[pygtk] ToggleButton mouseover behavior

Lang Hurst lang at tharin.com
Sat Jul 3 10:41:18 WST 2010


On 06/30/2010 01:43 PM, Lang Hurst wrote:
> Is there a way to make a ToggleButton not change state when moused
> over?  I set the color of the button when clicked with a line like so:
>
> widget.modify_bg(gtk.STATE_ACTIVE, gtk.gdk.color_parse("light blue"))
>
>    

Well, after reading the gnome gtk guidlines, I tried to toggle the 
background when the button is active using

    widget.modify_bg(gtk.STATE_PRELIGHT, gtk.gdk.color_parse("light blue"))


because the doc said

    PRELIGHT

    Prelight means mouse over effects. Usually the background will be
    slightly lighter.


but that only succeeded in placing a halo around the button when it was 
active and moused over.  My app will only be used by me, so I can work 
around this.  Still, what a bummer.

-- 
There are no stupid questions, just stupid people.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20100702/7f68d145/attachment.htm 


More information about the pygtk mailing list