def __init__(self, parent, main_window, no_tabs): self.parent = parent self.main_window = main_window self.no_tabs = no_tabs IntCtrl.__init__(self, parent, allow_long=True, style=wx.NO_BORDER, default_color=get_color(config["text_color"])) self.last_change_s = time.clock() tipmsg = _("For switching tables enter the table number or " "use the mouse wheel.") self.SetToolTip(wx.ToolTip(tipmsg)) # State for preventing to post GridActionTableSwitchMsg self.switching = False self.cursor_pos = 0 self.Bind(EVT_INT, self.OnInt) self.Bind(wx.EVT_MOUSEWHEEL, self.OnMouseWheel) self.Bind(wx.EVT_SET_FOCUS, self.OnFocus) self.main_window.Bind(self.EVT_CMD_RESIZE_GRID, self.OnResizeGrid) self.main_window.Bind(self.EVT_CMD_TABLE_CHANGED, self.OnTableChanged)
def __init__(self, parent, no_tabs): self.parent = parent self.no_tabs = no_tabs IntCtrl.__init__(self, parent, limited=True, allow_long=True) self.SetMin(0) self.SetMax(no_tabs - 1) self.SetToolTip(wx.ToolTip( \ "Enter grid table number or use mouse wheel to change tables.")) self.Bind(EVT_INT, self.OnInt) self.Bind(wx.EVT_MOUSEWHEEL, self.OnMouseWheel) self.parent.Bind(EVT_COMMAND_RESIZE_GRID, self.OnResizeGrid)
def __init__(self, parent, no_tabs): self.parent = parent self.no_tabs = no_tabs IntCtrl.__init__(self, parent, limited=True, allow_long=True) self.SetMin(0) self.SetMax(no_tabs - 1) tipmsg = _("For switching tables enter the table number or " "use the mouse wheel.") self.SetToolTip(wx.ToolTip(tipmsg)) # State for preventing to post GridActionTableSwitchMsg self.switching = False self.Bind(EVT_INT, self.OnInt) self.Bind(wx.EVT_MOUSEWHEEL, self.OnMouseWheel) self.parent.Bind(self.EVT_CMD_RESIZE_GRID, self.OnResizeGrid)
def __init__(self, parent, main_window, no_tabs): self.parent = parent self.main_window = main_window self.no_tabs = no_tabs IntCtrl.__init__(self, parent, allow_long=True, style=wx.NO_BORDER) self.last_change_s = time.clock() tipmsg = _("For switching tables enter the table number or " "use the mouse wheel.") self.SetToolTip(wx.ToolTip(tipmsg)) # State for preventing to post GridActionTableSwitchMsg self.switching = False self.cursor_pos = 0 self.Bind(EVT_INT, self.OnInt) self.Bind(wx.EVT_MOUSEWHEEL, self.OnMouseWheel) self.Bind(wx.EVT_SET_FOCUS, self.OnFocus) self.main_window.Bind(self.EVT_CMD_RESIZE_GRID, self.OnResizeGrid) self.main_window.Bind(self.EVT_CMD_TABLE_CHANGED, self.OnTableChanged)
def __init__(self, parent, main_window, no_tabs): self.parent = parent self.main_window = main_window self.no_tabs = no_tabs IntCtrl.__init__(self, parent, limited=True, allow_long=True) self.SetMin(0) self.SetMax(no_tabs - 1) tipmsg = _("For switching tables enter the table number or " "use the mouse wheel.") self.SetToolTip(wx.ToolTip(tipmsg)) # State for preventing to post GridActionTableSwitchMsg self.switching = False self.Bind(EVT_INT, self.OnInt) self.Bind(wx.EVT_MOUSEWHEEL, self.OnMouseWheel) self.main_window.Bind(self.EVT_CMD_RESIZE_GRID, self.OnResizeGrid) self.main_window.Bind(self.EVT_CMD_TABLE_CHANGED, self.OnTableChanged)
def __init__(self, *args, **kwargs): IntCtrl.__init__(self, *args, **kwargs) self.__bindings()