コード例 #1
0
    def __init__(self, parent):
        Menu.__init__(self)

        self.parent = parent
        self.statusbartoggler = self.Append(ITEM_CHECK,'Show StatusBar', 'Show Statusbar', kind=ITEM_CHECK)
        self.Check(self.statusbartoggler.GetId(), True)
        
        self.Bind(EVT_MENU, self.onToggleStatusBar, self.statusbartoggler)
コード例 #2
0
    def __init__(self, data):
        Menu.__init__(self)

        self.__id_and_item_data = self.__get_ids_and_item_data(data)
        self.__text_and_item_data = dict([(d.text, d) for d in self.__id_and_item_data.values()])

        self.__create_menu(data)
        self._bind_evt_menu(self.__on_menu_click)
コード例 #3
0
    def __init__(self, data):
        Menu.__init__(self)

        self.__id_and_item_data = self.__get_ids_and_item_data(data)
        self.__text_and_item_data = dict([
            (d.text, d) for d in self.__id_and_item_data.values()
        ])

        self.__create_menu(data)
        self._bind_evt_menu(self.__on_menu_click)
コード例 #4
0
 def __init__(self, parent):
     Menu.__init__(self)
     
     self.parent = parent
     
     self.connect = self.Append(ID_HOME, "C&onnect", "Open Connection To DB")   
     self.settings = self.Append(ID_PREFERENCES, "S&ettings", "Adjust Program Settings")   
     self.about = self.Append(ID_ABOUT, "&About","Information about this program")
     self.AppendSeparator()
     self.exit = self.Append(ID_EXIT,"E&xit"," Terminate the program")
     
     self.Bind(EVT_MENU, self.onConnect, self.connect)
     self.Bind(EVT_MENU, self.onSettings, self.settings)
     self.Bind(EVT_MENU, self.onAbout, self.about)
     self.Bind(EVT_MENU, self.onExit, self.exit)
コード例 #5
0
    def __init__(self, parent):
        Menu.__init__(self)
        self.parent = parent

        men1 = MenuItem(self, 1, "Copy Address")
        self.Append(men1)
        self.Bind(EVT_MENU, self.parent.copy_account, men1)

        men2 = MenuItem(self, 2, "Open block explorer")
        self.Append(men2)
        self.Bind(EVT_MENU, self.parent.open_explorer, men2)

        men3 = MenuItem(self, 3, "Open in wallet")
        self.Append(men3)
        self.Bind(EVT_MENU, self.parent.open_wallet, men3)