demo_logon_default.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:wxWize 作者: AndersMunch 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号