Hi guys im newbie. Im using Boa v0.2.3 with wxPython
2.4 for Python 2.3.
�
I wanna customize the status bar & using the code from
the demo (with the timer things).
So I made a module(CustomStatusBar.py):
from wxPython.wx import *
import time
class CustomStatusBar(wxStatusBar):
def __init__(self, parent, id):
wxStatusBar.__init__(self, parent, id)
self.SetFieldsCount(2)
self.SetStatusText(text='Skor Kardiovaskular
Jakarta')
self.timer = wxPyTimer(self.Notify)
self.timer.Start(1000)
self.Notify()
self.SetStatusWidths([-1, -1])
def Notify(self):
t = time.localtime(time.time())
st = time.strftime("%d-%b-%Y %I:%M:%S", t)
self.SetStatusText(st, 1)
and Change on my Main (wxFrame):
1. import CustomStatusBar
2. Adding "wxID_MAINMENUSTATUSBAR1," to map(lambda
_init_ctrls:... & increase the range
3. Add "_custom_classes = {'wxStatusBar':
['CustomStatusBar.CustomStatusBar']}" right below the
"class mainMenu(wxFrame):"
4. And finally adding:
self.statusBar1 =
CustomStatusBar.CustomStatusBar(self, id =
wxID_MAINMENUSTATUSBAR1)
self.statusBar1.SetPosition(wxPoint(0, 547))
self.statusBar1.SetSize(wxSize(780, 20))
self.SetStatusBar(self.statusBar1)
When I ran this things it works, but when I got back
to the Boa & tried to open the designer I always got
this:
"""
The following lines were not used by the Designer and
will be lost:
self.statusBar1 =
CustomStatusBar.CustomStatusBar(self,
id = wxID_MAINMENUSTATUSBAR1)
There were unprocessed lines in the source code of
method: _init_ctrls
If this was unexpected, it is advised that you cancel
this Designer session and correct the problem before
continuing.
"""
And my scripts on number 4 (above) its GONE!
Can anyone help me with these?
Thanx
Danu
···
__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com