Subclass dialog : Dialog : WxPython PYTHON TUTORIALS


PYTHON TUTORIALS » WxPython » Dialog »

 

Subclass dialog


Subclass dialog
import wx

class SubclassDialog(wx.Dialog):
    def __init__(self):
        wx.Dialog.__init__(self, None, -1'Dialog Subclass', size=(300100))
        okButton = wx.Button(self, wx.ID_OK, "OK", pos=(1515))
        okButton.SetDefault()
        cancelButton = wx.Button(self, wx.ID_CANCEL, "Cancel",pos=(11515))
        

app = wx.PySimpleApp()
app.MainLoop() 
dialog = SubclassDialog()
result = dialog.ShowModal()
if result == wx.ID_OK:
    print "OK"
else:
    print "Cancel"
dialog.Destroy()



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo WxPython
» Dialog