Cleanup of library dialogs

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2001-11-14 04:04:31 +00:00
parent 101dd79ab6
commit edc2a0366a

View File

@@ -6,11 +6,7 @@ import string
class wxScrolledMessageDialog(wxDialog): class wxScrolledMessageDialog(wxDialog):
def __init__(self, parent, msg, caption, pos = None, size = None): def __init__(self, parent, msg, caption, pos = wxDefaultPosition, size = (500,300)):
if not pos:
pos = wxDefaultPosition
if not size:
size = wxSize(500,300)
wxDialog.__init__(self, parent, -1, caption, pos, size) wxDialog.__init__(self, parent, -1, caption, pos, size)
text = wxTextCtrl(self, -1, msg, wxDefaultPosition, text = wxTextCtrl(self, -1, msg, wxDefaultPosition,
wxDefaultSize, wxDefaultSize,
@@ -24,11 +20,7 @@ class wxScrolledMessageDialog(wxDialog):
class wxMultipleChoiceDialog(wxDialog): class wxMultipleChoiceDialog(wxDialog):
def __init__(self, parent, msg, title, lst, pos = None, size = None): def __init__(self, parent, msg, title, lst, pos = wxDefaultPosition, size = (200,200)):
if not pos:
pos = wxDefaultPosition
if not size:
size = wxSize(200,200)
wxDialog.__init__(self, parent, -1, title, pos, size) wxDialog.__init__(self, parent, -1, title, pos, size)
dc = wxClientDC(self) dc = wxClientDC(self)
height = 0 height = 0
@@ -48,10 +40,6 @@ class wxMultipleChoiceDialog(wxDialog):
self.SetAutoLayout(TRUE) self.SetAutoLayout(TRUE)
self.lst = lst self.lst = lst
self.Layout() self.Layout()
EVT_SIZE(self, self.OnSize)
def OnSize(self, event):
self.Layout()
def GetValue(self): def GetValue(self):
return self.lbox.GetSelections() return self.lbox.GetSelections()
@@ -63,6 +51,7 @@ class wxMultipleChoiceDialog(wxDialog):
val.append(self.lst[i]) val.append(self.lst[i])
return tuple(val) return tuple(val)
if __name__ == '__main__': if __name__ == '__main__':
class MyFrame(wxFrame): class MyFrame(wxFrame):
def __init__(self): def __init__(self):