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