wxPython/wxGlade-0.9.1/widgets/toolbar/toolbar.py
def _do_move_item(self, event, index, is_down):
        """internal function used by move_item_up and move_item_down.
        Returns the new index of the moved item, or None if no change occurred"""
        self.items.SetFocus()
        #index = self.selected_index
        i = index+1 if is_down else index-1
        if i < 0 or i>=self.items.GetItemCount(): return None

        def get(i, j): return self.items.GetItem(i, j).GetText()
        item = [get(index, j) for j in range(6)]
        self.items.DeleteItem(index)
        compat.ListCtrl_InsertStringItem(self.items, i, item[0])
        for col,content in enumerate(item):
            if col==0: continue
            compat.ListCtrl_SetStringItem(self.items, i,col, content)
        self._select_item(i, force=True)
internal function used by move_item_up and move_item_down.
        Returns the new index of the moved item, or None if no change occurred
internal function used by move_item_up and move_item_down.
Returns the new index of the moved item, or None if no change occurred
internal function used by move_item_up and move_item_down . Returns the new index of the moved item or None if no change occurred
def _do_move_item(self, event, index, is_down):
        self.items.SetFocus()
        i = index+1 if is_down else index-1
        if i < 0 or i>=self.items.GetItemCount(): return None
        def get(i, j): return self.items.GetItem(i, j).GetText()
        item = [get(index, j) for j in range(6)]
        self.items.DeleteItem(index)
        compat.ListCtrl_InsertStringItem(self.items, i, item[0])
        for col,content in enumerate(item):
            if col==0: continue
            compat.ListCtrl_SetStringItem(self.items, i,col, content)
        self._select_item(i, force=True)
def _do_move_item ( self , event , index , is_down ) : self . items . SetFocus ( ) i = index + 1 if is_down else index - 1 if i < 0 or i >= self . items . GetItemCount ( ) : return None def get ( i , j ) : return self . items . GetItem ( i , j ) . GetText ( ) item = [ get ( index , j ) for j in range ( 6 ) ] self . items . DeleteItem ( index ) compat . ListCtrl_InsertStringItem ( self . items , i , item [ 0 ] ) for col , content in enumerate ( item ) : if col == 0 : continue compat . ListCtrl_SetStringItem ( self . items , i , col , content ) self . _select_item ( i , force = True )
internal function used by move_item_up and move_item_down.
internal function used by move_item_up and move_item_down .
"""internal function used by move_item_up and move_item_down.
        Returns the new index of the moved item, or None if no change occurred""" #index = self.selected_index
self
event
index
is_down