24 wxPython を用いたダイアログ・モジュール 33 provider = wx.SimpleHelpProvider()
34 wx.HelpProvider_Set(provider)
41 self, parent, ID, message, size=wx.DefaultSize, pos=wx.DefaultPosition
50 pos -- dialog の位置
[戻り値]
void
56 style=wx.DEFAULT_DIALOG_STYLE
66 pre.Create(parent, ID, title, pos, size, style)
75 sizer = wx.BoxSizer(wx.VERTICAL)
77 label = wx.StaticText(self, -1, message)
78 sizer.Add(label, 0, wx.ALIGN_CENTRE|wx.ALL, 5)
80 line = wx.StaticLine(self, -1, size=(20,-1), style=wx.LI_HORIZONTAL)
81 sizer.Add(line, 0, wx.GROW|wx.ALIGN_CENTER_VERTICAL|wx.RIGHT|wx.TOP, 5)
83 box = wx.BoxSizer(wx.HORIZONTAL)
85 btn = wx.Button(self, wx.ID_OK,
" OK ")
87 box.Add(btn, 0, wx.ALIGN_CENTRE|wx.ALL, 5)
89 btn = wx.Button(self, wx.ID_CANCEL,
" Cancel ")
90 box.Add(btn, 0, wx.ALIGN_CENTRE|wx.ALL, 5)
92 sizer.Add(box, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALL, 5)
95 self.SetAutoLayout(
True)
101 print "traceback code:",sys.exc_traceback.tb_frame.f_code
102 print "except line:",sys.exc_traceback.tb_lineno
103 print mess, sys.exc_type, sys.exc_value
def __init__(self, parent, ID, message, size=wx.DefaultSize, pos=wx.DefaultPosition)