> -----Original Message-----
> From: wxpython-users@googlegroups.com [mailto:wxpython-
> users@googlegroups.com] On Behalf Of DevPlayer
> Sent: Monday, August 16, 2010 7:31 PM
> To: wxPython-users
> Subject: [wxPython-users] Re: Attempts to change
> wx.StatusBar.BackgroundColour
> In an attempt to find a working example for my statusbar color problem
> I found something on the wxPyWiki.
> However the certain section of example code on the wxPyWiki does not
> clearly work without modification, nor for what I need to learn from
> it. See
>http://wiki.wxpython.org/AnotherTutorial
> The section about 80% the way down the wiki page labelled:
> " Error handling without dialogs "
> There is no "self.Show()" at the end of Isabella.__init__() or after
> app = wx.App(). There is no "class MyApp(wx.App):" used in this
> example. There is no Show() called for that frame I can see. Therefore
> the main frame portrade below the example doesn't show as running the
> example code proves (on my machine).
> Also the text after the source code incorrectly states "There is
> awx.TextCtrl on the Statusbar." I believe it means to say "There is a
> wx.TextCtrl on the toolbar."
> In the following discussion it shows a code snippet "self.timer =
> wx.Timer(self, 1)" which is not in the Isabella.py example code. I
> think the author means to say "self.timer = wx.Timer(self, ID_TIMER)".
> Although ID_TIMER = 1, a novice coping this code could spend some
> unnecessary time debugging it if she changed the ID_TIMER to a
> different value and think the "1" represents "1 second" instead.
> I think The next code snippet "wx.EVT_TIMER(self, 1, self.OnTimer)"
> in the discussion is meant to represent the line
> "self.Bind(wx.EVT_TIMER, self.OnTimer, id=ID_TIMER)" in the
> Isebella.py example code. A novice may not know they are near
> equivelent. Not everyone will have read those notes that they are
> equivalent.
> Adding the self.Show() to the end of the Isabella.__init__() makes the
> frame show and the demo app to -mostly- work. I'm using Python 2.7,
> wxPython 2.8.11.0, MSW-XP Pro-32bit. The statusbar does not turn red
> when I run the modificed Isabella.py example.
> I don't feel versed enough to mess with wiki pages, nor do I wish to
> login to the wiki with my real name (yet), and "TheRules" of the wiki
> ruling want that.
> If anyone knows a fix to getting the statusbar to change color for the
> Isebella.py example please let me know.
> --
> To unsubscribe, send email to wxPython-
> users+unsubscribe@googlegroups.com
> or visithttp://groups.google.com/group/wxPython-users?hl=en
[alm>]
I, too, asked this question recently and the answer is 'no'.
I also looked at the demo and that Isabelle thing. Isabelle seems to be old
and may have worked at one time but not now or not for me. A message will
appear but no color. I think what's happening there is the frame's built-in
minimal statusbar support.
The attached files are what I came up with. These are 2 of 18 files of the
app I've been working on so don't expect it to just work.
amain.py is the main app file. Copy stuff from there to your app; get
everything 'statusbar' related.
astat.py has a wx.StatusBar sub-class. Import this file/module into your app
main.
Once everything is in and working you can do something like this to put a
message on the status bar:
wx\.GetApp\(\)\.status\_msg\( "Money fields may only have one '\.'\!", 1 \)
It will vanish in about 3 seconds, see TIMER_EXPIRE.
I've attached an example screen shot for the status_msg call with
severity=1.
I may not be finished with astat.py and so I've left commented code there
for the other statusbar fields and some of the isabelle and demo code that
didn't work or I don't need yet.
Al