wSearchText.SetFocus()
result = DialogResults(dlg.ShowModal())
- result.text = wSearchText.GetValue()
- result.wholeword = wWholeWord.GetValue()
- result.casesensitive = wCase.GetValue()
+ result.searchText = wSearchText.GetValue()
+ result.wholeWordsOnly = wWholeWord.GetValue()
+ result.caseSensitive = wCase.GetValue()
dlg.Destroy()
return result
fontData.SetInitialFont(wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT))
if font is not None:
- aFontData.SetInitialFont(font)
+ fontData.SetInitialFont(font)
dialog = wx.FontDialog(parent, fontData)
result = DialogResults(dialog.ShowModal())
def singleChoiceDialog(parent=None, message='', title='', lst=[],
style=wx.OK | wx.CANCEL | wx.CENTRE):
- dialog = wx.SingleChoiceDialog(parent, message, title, lst, style)
+ dialog = wx.SingleChoiceDialog(parent, message, title, list(lst), style | wx.DEFAULT_DIALOG_STYLE)
result = DialogResults(dialog.ShowModal())
result.selection = dialog.GetStringSelection()
dialog.Destroy()
class MyApp(wx.App):
def OnInit(self):
- self.frame = frame = wx.Frame(None, -1, "Dialogs", size=(400, 200))
+ self.frame = frame = wx.Frame(None, -1, "Dialogs", size=(400, 240))
panel = wx.Panel(frame, -1)
self.panel = panel