次の方法で共有


MoveItem Method

Moves an item to a new position in a list box.

ListBox.MoveItem(nItemIndex, nMoveBy)

Parameters

  • nItemIndex
    Specifies the current index for the item you wish to move.
  • nMoveBy
    Indicates how many positions the item should be moved. A positive value indicates downward movement. A negative number indicates upward movement.

Remarks

Calling the MoveItem method fires the OnMoveItem event.

The OnMoveItem event always fires once when the MoveItem method is called, however, movement of an item in the list box occurs only if the grid's RowSourceType property is set to 0 (None) or 1 (Value).

See Also

Methods | OnMoveItem Event | RowSourceType Property | MoverBars Property

Applies To: ListBox Control