wxPython/wxGlade-0.9.1/widgets/menubar/menubar.py
def add_item(self, event):
        "Event handler called when the Add button is clicked"
        index = self.selected_index = self.selected_index + 1
        indent = ""
        if not self.menu_items.GetItemCount():
            self._enable_fields()
        if index < 0:
            index = self.menu_items.GetItemCount()
        elif index > 0:
            indent = "    " * self.item_level(index-1)
        name, label, id, check_radio = "", "item", "", "0"
        self.menu_items.InsertStringItem(index, indent + label)
        self.menu_items.SetStringItem(index, 2, name)
        self.menu_items.SetStringItem(index, 3, check_radio)
        self.menu_items.SetStringItem(index, 5, id)
        # fix bug 698074
        self.menu_items.SetItemState(index, wx.LIST_STATE_SELECTED, wx.LIST_STATE_SELECTED)
        self._select_item(index, force=True)
Event handler called when the Add button is clicked
Event handler called when the Add button is clicked
Event handler called when the Add button is clicked
def add_item(self, event):
        index = self.selected_index = self.selected_index + 1
        indent = ""
        if not self.menu_items.GetItemCount():
            self._enable_fields()
        if index < 0:
            index = self.menu_items.GetItemCount()
        elif index > 0:
            indent = "    " * self.item_level(index-1)
        name, label, id, check_radio = "", "item", "", "0"
        self.menu_items.InsertStringItem(index, indent + label)
        self.menu_items.SetStringItem(index, 2, name)
        self.menu_items.SetStringItem(index, 3, check_radio)
        self.menu_items.SetStringItem(index, 5, id)
        self.menu_items.SetItemState(index, wx.LIST_STATE_SELECTED, wx.LIST_STATE_SELECTED)
        self._select_item(index, force=True)
def add_item ( self , event ) : index = self . selected_index = self . selected_index + 1 indent = "" if not self . menu_items . GetItemCount ( ) : self . _enable_fields ( ) if index < 0 : index = self . menu_items . GetItemCount ( ) elif index > 0 : indent = "    " * self . item_level ( index - 1 ) name , label , id , check_radio = "" , "item" , "" , "0" self . menu_items . InsertStringItem ( index , indent + label ) self . menu_items . SetStringItem ( index , 2 , name ) self . menu_items . SetStringItem ( index , 3 , check_radio ) self . menu_items . SetStringItem ( index , 5 , id ) self . menu_items . SetItemState ( index , wx . LIST_STATE_SELECTED , wx . LIST_STATE_SELECTED ) self . _select_item ( index , force = True )
Event handler called when the Add button is clicked
Event handler called when the Add button is clicked
"Event handler called when the Add button is clicked" # fix bug 698074
self
event