def __init__(self, parent):
with iz.Dialog(init=self, title=u"Logon", orient=wx.VERTICAL, style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER):
with iz.GridBagSizer(orient=wx.HORIZONTAL, proportion=1) as gb:
# Defaults for StaticText and TextCtrl are normally border=0,proportion=0,flag=0. Change them temporarily
# to avoid repeating the same options for each and every control:
with iz.StaticText.Default(border=10), iz.TextCtrl.Default(border=10, proportion=1, flag=wx.EXPAND):
# Now the sizer parameters can be omitted in the control definitions, since the defaults are
# now appropriate.
iz.StaticText(u"Username")
self._name = iz.TextCtrl().wx
iz.StaticText(u"Password", x=0)
self._pass = iz.TextCtrl(style=wx.TE_PASSWORD).wx
gb.AddGrowableCol(1)
with iz.StdDialogButtonSizer():
okbut = iz.Button(u"OK", id=wx.ID_OK).wx
iz.Button(u"Cancel", id=wx.ID_CANCEL)
insp = iz.Button(u"Help", id=wx.ID_HELP,border=10, EVT_BUTTON=InspectionTool().Show).wx
okbut.SetDefault()
self.Fit()
评论列表
文章目录