twblue/src/widgetUtils/wxUtils.py

17 lines
304 B
Python
Raw Normal View History

import wx
# Code responses for WX dialogs.
OK = wx.ID_OK
CANCEL = wx.ID_CANCEL
CLOSE = wx.ID_CLOSE
YES = wx.ID_YES
NO = wx.ID_NO
#events
CLOSE_EVENT = wx.EVT_CLOSE
def exit_application():
wx.GetApp().ExitMainLoop()
def connect_event(parent, event, func):
return getattr(parent, "Bind")(event, func)