def OnComponentSortOrderRemove(self, event):
    selection = self.componentSortOrderBox.Selection
    if (selection != wx.NOT_FOUND):
        item = self.componentSortOrderBox.GetString(selection)
        if (item == '~'):
            pop_error("You can not delete '~' item")
            return
        self.componentSortOrderBox.Delete(selection)
        if (self.componentSortOrderBox.Count > 0):
            self.componentSortOrderBox.SetSelection(max((selection - 1), 0))
def OnComponentSortOrderRemove(self, event):
    selection = self.componentSortOrderBox.Selection
    if (selection != wx.NOT_FOUND):
        item = self.componentSortOrderBox.GetString(selection)
        if (item == '~'):
            pop_error("You can not delete '~' item")
            return
        self.componentSortOrderBox.Delete(selection)
        if (self.componentSortOrderBox.Count > 0):
            self.componentSortOrderBox.SetSelection(max((selection - 1), 0))