[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'StdCtrls' (#lcl)

TCustomListBox.MakeCurrentVisible

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

Declaration

Source position: stdctrls.pp line 626

public procedure TCustomListBox.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

TCustomListBox.ItemIndex

  

Ordinal position for the currently selected item, -1 if none.

TCustomListBox.ItemFullyVisible

  

Returns True if the item is fully visible in the scrollable list.

TCustomListBox.ItemVisible

  

Returns True if the item is at least partially visible in the scrollable list.

TCustomListBox.TopIndex

  

Index of the first visible (or top-most) item.

TCustomListBox.Items

  

The list of all items defined in the control.


Version 4.0 Generated 2025-05-03 Home