wxPython/wxGlade-0.9.1/widgets/menubar/menubar.py
def remove_item(self, event):
        "Event handler called when the Remove button is clicked"
        if self.selected_index < 0: return
        index = self.selected_index+1
        if index<self.menu_items.GetItemCount() and (self.item_level(self.selected_index) < self.item_level(index)):
            # the item to be deleted is parent to the following item -> move up the following item
            self._move_item_left(index)
            #self.selected_index = index-1
        for s in (self.name, self.id, self.label, self.help_str, self.event_handler):
            s.SetValue("")
        self.check_radio.SetSelection(0)
        self.menu_items.DeleteItem(self.selected_index)
        if not self.menu_items.GetItemCount():
            self._enable_fields(False)
        self.selected_index -= 1
        self.menu_items.Select(self.selected_index)
Event handler called when the Remove button is clicked
Event handler called when the Remove button is clicked
Event handler called when the Remove button is clicked
def remove_item(self, event):
        if self.selected_index < 0: return
        index = self.selected_index+1
        if index<self.menu_items.GetItemCount() and (self.item_level(self.selected_index) < self.item_level(index)):
            self._move_item_left(index)
        for s in (self.name, self.id, self.label, self.help_str, self.event_handler):
            s.SetValue("")
        self.check_radio.SetSelection(0)
        self.menu_items.DeleteItem(self.selected_index)
        if not self.menu_items.GetItemCount():
            self._enable_fields(False)
        self.selected_index -= 1
        self.menu_items.Select(self.selected_index)
def remove_item ( self , event ) : if self . selected_index < 0 : return index = self . selected_index + 1 if index < self . menu_items . GetItemCount ( ) and ( self . item_level ( self . selected_index ) < self . item_level ( index ) ) : self . _move_item_left ( index ) for s in ( self . name , self . id , self . label , self . help_str , self . event_handler ) : s . SetValue ( "" ) self . check_radio . SetSelection ( 0 ) self . menu_items . DeleteItem ( self . selected_index ) if not self . menu_items . GetItemCount ( ) : self . _enable_fields ( False ) self . selected_index -= 1 self . menu_items . Select ( self . selected_index )
Event handler called when the Remove button is clicked
Event handler called when the Remove button is clicked
"Event handler called when the Remove button is clicked" # the item to be deleted is parent to the following item -> move up the following item #self.selected_index = index-1
self
event