···
Sent: Friday, September 17, 2010 10:22 AM
To: wxpython-users@googlegroups.com
Subject: RE: [wxPython-users] Facing Issue in wxStaticBox widget
From:
wxpython-users@googlegroups.com [mailto:wxpython-users@googlegroups.com] On
Behalf Of mukul sharma
Sent: Friday, September 17, 2010 8:59 AM
To: wxpython-users@googlegroups.com
Subject: [wxPython-users] Facing Issue in wxStaticBox widget
Hi All,
Actually i am inheriting wx.StaticBox as given below.
class My_StaticBox(wx.StaticBox):
def init(self, Parent = None, id =wx.ID_ANY, text =’’ ):
wx.StaticBox.init(self, parent = Parent, id=id )
self.text = text
self.SetFont(font1)
self.SetOwnForegroundColour(wx.Colour( 255, 186,
23))
self.SetLabel(self.text)
When you creat a object of StaticBox, So this will set label/string properly
with desire color.
But when you press any key( tab or down key) That time the text color
is changing to default (some sort of blue in windows xp)text color, one strange
thing is
that, This is happening first time key press only.Once you refresh
this it is working fine ie with desire color of text later on there
is no color change in text color.
I am attaching sample app and screen shot here.
Can you guess where i am doing wrong???
I am using wxpython 2.8.10 on window xp with python 2.5.
Thanks & Reagrds,
Mukul Sharma
–
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en
[alm>]
I
don’t see any issues (with and without changing the provided example to match
your email).
I
am on XP using py 2.6 and wx 2.8.11.
Upgrading
may be in order.
I
do have several staticboxes in my own project and change those to black text
without issue.
Al
–
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en
[alm>]
Looks
like I spoke too soon.
Running
this as a shortcut, rather than from the command line, does show the problem of
the staticBox text changing back to it’s default blue color. The background
color is not changed.
This
happens on any ‘navigation’ key: tab, shift-tab, up/down/left/right arrow,
enter, shift-enter, page up/down and alt (all by itself). There may be others.
It
also happens in my own project but only when run by clicking a shortcut, not
from a cygwin command line.
Is
this a known issue? Is there a workaround?
Al