[wxPython-users] unwanted border around GTK & bitmapbutton

Robin Dunn robin at alldunn.com
Tue Mar 4 13:59:15 PST 2008


Paul Sijben wrote:
> 
> 
> Robin Dunn wrote:
>> Paul Sijben wrote:
>>> I find that on GTK (Ubuntu 7.10, most recent wxPython) my bitmapbuttons
>>> get some unwanted borders that aren't there on WinXP. GTK uses those
>>> borders to darken the edge on hover.
>>>
>>> How do I stop this from happening?
>>
>> Try using the wx.NO_BORDER style.  
> 
> that works on WinXP but not GTK :-(
> 
>> Depending on the active theme that may do it for you, although it will 
>> probably still try to draw something when the mouse moves over the 
>> button.  If you don't want any effects from the theme then you can use 
>> the GenBitmapButton class from wx.lib.buttons with a wx.NO_BORDER style.
>>
>>
> thanks, will try that tomorrow. Is there a convenient way to use this 
> from XRC?

Not necessarily convenient at the moment, but doable.  You'll have to 
write a handler for it so XRC knows how to construct it.  If you use 
XRCed then you can also use it's new plugin facility to be able to use 
it from XRCed too.


-- 
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!





More information about the wxpython-users mailing list