/examples/onclicktest/OnClickTest.py
Python | 21 lines | 12 code | 9 blank | 0 comment | 0 complexity | 1a6e399df01b6c55ec6ec38125c46609 MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0
- from ui import Button, RootPanel
- import Window
- def onButtonClick(sender):
- Window.alert("function called")
- class OnClickTest:
- def onModuleLoad(self):
- self.b = Button("function callback", onButtonClick)
- self.b2 = Button("object callback", self)
- RootPanel().add(self.b)
- RootPanel().add(self.b2)
- def onClick(self, sender):
- Window.alert("object called")