On Oct 11, 2005, at 2:42 AM, Adi J. Sieker wrote:
in this sample app I want to delete or somehow hide the list box
when the user presses Escape.
How do I achieve that?
Use the Visible property. Try this code instead:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
import dabo
dabo.ui.loadUI("wx")
class TestForm(dabo.ui.dForm):
def afterInit(self):
choices = ("aaaa", "bbbb")
self.lb = self.addObject(dabo.ui.dListBox, Choices=choices)
self.lb.bindKey("Escape", self.onEscape)
self.lb.Position = (10,10)
def onEscape(self, evt):
self.lb.Visible = not self.lb.Visible
app = dabo.dApp(MainFormClass=TestForm)
app.start()
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users