mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-10-17 17:49:16 +02:00
16 lines
462 B
Python
16 lines
462 B
Python
|
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
|