|
From: Kevin A. <al...@se...> - 2001-08-30 17:06:57
|
If you want a simple statusBar, you can now just put 'statusBar':1 in your
resource stack description. For example, here's minimal.rsrc.py with a
statusBar
{ 'stack':{ 'type':'Stack',
'name':'Minimal',
'title':'Minimal PythonCard Application',
'size':( 200, 100 ),
'statusBar':1,
The statusBar is part of the height of the window, so you'll probably have
to increase your window height if you decide to add one.
I put the StatusBar class in a separate file in anticipation of someday
having a much more elaborate class that supports various widgets like a
background, but that you won't have to manage yourself. For now, it is
braindead simple, all you can do is get and set the text. Here's a few lines
in the shell using the modified minimal.rsrc.py file.
>>> bg.statusBar.text = 'hello statusBar'
>>> bg.statusBar.text
'hello statusBar'
Due to a bug in the resourceEditor, if you open a .rsrc.py file that has a
'statusBar':1 then you'll have to quit the resourceEditor before opening a
.rsrc.py that doesn't have one defined. I have a question into Robin to find
out how to dynamically delete the status bar and when I get an answer I'll
fix it and update what's in cvs.
ka
|