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

Applies To: ListBox Control

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 list box's RowSourceType property is set to 0 (None) or 1 (Value).

See Also

Reference

OnMoveItem Event
RowSourceType Property
MoverBars Property

Other Resources

Methods (Visual FoxPro)