hello,
what did i do wrong in the code below? i wanted to show a label, a
button on a form, but they're not shown when form is displayed. i
guess the error is in the sizers.
another question: does every dForm have the standard menu "File",
"Edit", "View" and "Help"? how do i modify the menu items? or what if
i don't want menu for very simple form?
thank you.
import dabo
dabo.ui.loadUI("wx")
import dabo.dEvents as dEvents
class TestForm(dabo.ui.dForm):
def afterInit(self):
self.Caption = "TestForm"
self.Size = (200, 400)
self.Position = (300, 200)
pnl = dabo.ui.dPanel(self)
mainSz = dabo.ui.dSizer("v")
lblSz = dabo.ui.dSizer("h")
self.lblMsg = dabo.ui.dLabel(pnl, Alignment = "Left", Caption
= "This is a test.")
lblSz.DefaultSpacing = 5
lblSz.DefaultBorder= 20
lblSz.DefaultBorderLeft = lblSz.DefaultBorderRight = True
lblSz.append(self.lblMsg)
btnSz = dabo.ui.dSizer("h")
self.btnOk = dabo.ui.dButton(pnl, Caption = "OK")
btnSz.append(self.btnOk, "center")
mainSz.append(lblSz, "expand", 1)
mainSz.append(btnSz, "expand", 0)
pnl.Sizer = mainSz
mainSz.layout()
self.fitToSizer()
if __name__ == "__main__":
app = dabo.dApp()
app.MainFormClass = TestForm
app.start()
--
Kelie
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users