Wheel-reinvention with Python
Paul McNett
p at ulmcnett.com
Mon Aug 1 14:10:15 EDT 2005
Devan L wrote:
> If you're creating a new instance of your dApp(I assume its a class)
> with no arguments, then effectively your just creating a default
> program which is already defined in the dabo module. If you could write
> it in a few, short lines of code by defining a new class, then you
> might have something there.
import dabo
app = dabo.dApp()
app.UI = "wx"
class MyTextBox(dabo.ui.dTextBox):
def initProperties(self):
self.Width = 200
self.Value = "Planet Earth is blue"
class MyForm(dabo.ui.dForm):
def afterInit(self):
self.addObject(MyTextBox)
def initProperties(self):
self.Caption = "Ground Control To Major Tom"
app.MainFormClass = MyForm
app.start()
--
Paul McNett
http://paulmcnett.com
More information about the Python-list
mailing list