Sign in Join
FPDoc Onlineexperiment

TCustomListBox.MakeCurrentVisible procedure

Member of TCustomListBoxpublicIn unit StdCtrls

Makes the item at ItemIndex visible, possibly scrolling the list.

Declaration

pascal
procedure MakeCurrentVisible

Description

MakeCurrentVisible is a procedure used to ensure that the current item selected in the control is also visible. The current selection is the value in Items stored at the position in ItemIndex. No actions are performed in the method when ItemIndex is out of bounds.

MakeCurrentVisible calls ItemFullyVisible to determine if the item at ItemIndex is already visible in the scrollable list. No additional actions are needed in the method when the item is already visible. Otherwise, the value in ItemIndex is assigned to the TopIndex property which causes the selected item to scroll to the top of the visible area in the list box.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.