mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-08-26 18:09:21 +00:00
The next generation branch has been added
This commit is contained in:
16
src/wxUI/dialogs/baseDialog.py
Normal file
16
src/wxUI/dialogs/baseDialog.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import wx
|
||||
|
||||
class BaseWXDialog(wx.Dialog):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(BaseWXDialog, self).__init__(*args, **kwargs)
|
||||
|
||||
def get_response(self):
|
||||
return self.ShowModal()
|
||||
|
||||
def get(self, control):
|
||||
if hasattr(self, control):
|
||||
control = getattr(self, control)
|
||||
if hasattr(control, "GetValue"): return getattr(control, "GetValue")()
|
||||
elif hasattr(control, "GetLabel"): return getattr(control, "GetLabel")()
|
||||
else: return -1
|
||||
else: return 0
|
Reference in New Issue
Block a user