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

TCustomListBox

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TCustomList Box : the base class for TListBox

Declaration

Source position: stdctrls.pp line 470

type TCustomListBox = class(TWinControl)

protected

  procedure AssignItemDataToCache(); virtual;

  

  procedure AssignCacheToItemData(); virtual;

  

  procedure BeginAutoDrag; override;

  

Start the AutoDrag process

  function CalculateStandardItemHeight;

  procedure Loaded; override;

  

  procedure InitializeWnd; override;

  

InitializeWnd - initialise the window for this control

  procedure FinalizeWnd; override;

  

FinalizeWnd - getting ready to remove window (gets called before the Handle is destroyed)

  function GetControlClassDefaultSize; override;

  

Find the default size for this class of controls (by reference to parents)

  procedure CheckIndex();

  

  function GetItemHeight;

  

  function GetItemIndex; virtual;

  

  function GetSelCount;

  

  function GetSelected();

  

  function GetCachedDataSize; virtual;

  

  function GetCachedData();

  

  procedure SetExtendedSelect(); virtual;

  

  procedure SetItemIndex(); virtual;

  

  procedure SetItems(); virtual;

  

  procedure SetItemHeight();

  

  procedure SetMultiSelect(); virtual;

  

  procedure SetSelected();

  

  procedure SetSorted(); virtual;

  

  procedure SetStyle(); virtual;

  

  procedure DrawItem(); virtual;

  

  procedure DoSelectionChange(); virtual;

  

  procedure SendItemIndex;

  

public

  constructor Create(); override;

  destructor Destroy; override;

  procedure Click; override;

  

Click - a procedure that allows the programmer to simulate a mouse click over the control, and initiates the same Action as that associated with the OnClick event

  procedure Clear; virtual;

  

Clear the listbox - both the edit box and the drop-down list

  procedure ClearSelection;

  

Clear the selected items

  function GetIndexAtY();

  

Find the index at the Y coordinate

  function GetSelectedText;

  

Get the selected text string

  function ItemAtPos();

  

Returns the index value of the item at the specified position

  function ItemRect();

  

Returns the coordinates of the rectangle in which the item lies

  function ItemVisible();

  

Is the item with the specified index visible?

  function ItemFullyVisible();

  

Is the item with the specified index fully visible (or is part of it outside the bounds of the visible window)?

  procedure LockSelectionChange;

  

Lock ( make permanent) the change in the selection

  procedure MakeCurrentVisible;

  

MakeCurrentVisible - makes the current item visible

  procedure MeasureItem(); virtual;

  

Measure the height of the item in the list with the specified index

  procedure SelectAll; virtual;

  

SelectAll - select all items in list

  procedure UnlockSelectionChange;

  

Unlock the previously locked change in selection

  property Align;

  

Used to align the control in one of four directions.

  property Anchors;

  

The set of anchor definitions for this control

  property BorderStyle;

  

BorderStyle - none, or single

  property Canvas: TCanvas; [r]

  

Canvas - defines the area on which all graphic material is drawn

  property ClickOnSelChange: Boolean; [rw]

  

Performs Click procedure when the selection is changed (which usually puts the selected item into the edit box)

  property Columns: Integer; [rw]

  

Columns - the number of vertical columns in which the Items are arranged

  property Constraints;

  

Determine Constraints (max and min height and width) for this control

  property Count: Integer; [r]

  

Count - the number of entries in the list of Items

  property ExtendedSelect: Boolean; [rw]

  

ExtendedSelect - boolean. Whether extended selection is allowed. Default True

  property Font;

  

The Font to be used for text in this control

  property IntegralHeight: Boolean; [rw]

  

not implemented

  property ItemHeight: Integer; [rw]

  

ItemHeight - the height of the individual Items

  property ItemIndex: Integer; [rw]

  

ItemIndex: Integer to indicate the currently selected item (zero origin)

  property Items: TStrings; [rw]

  

Items - an array of strings representing the list of entries

  property MultiSelect: Boolean; [rw]

  

MultiSelect - allows more than one Item from the list to be selected at a time, by pressing the CTRL or SHIFT key while selecting

  property OnChangeBounds;

  

Event handler for a change in bounds of the control

  property OnClick;

  

Event Handler for mouse click

  property OnDblClick;

  

Event Handle for mouse double-click

  property OnDrawItem: TDrawItemEvent; [rw]

  

OnDrawItem - event handler for drawing an Item

  property OnEnter;

  

OnEnter - event handler for when the mouse enters the control, and the control receives focus

  property OnExit;

  

OnExit - event handler for when the mouse leaves the control and it loses focus

  property OnKeyDown;

  

OnKeyDown - event handler for instance when key is down while control has focus

  property OnKeyPress;

  

OnKeyPress - event controller for a key being pressed while the control has focus. To properly handle national chars use UTF8KeyPress instead.

  property OnKeyUp;

  

OnKeyUp - event handler for instance when a key is up (not pressed) while the control has focus

  property OnMeasureItem: TMeasureItemEvent; [rw]

  

Event handler when an item requires to be measured

  property OnMouseDown;

  

Event handler for when a mouse button is pressed down

  property OnMouseMove;

  

Event handler for mouse movement within the current control

  property OnMouseUp;

  

Event handler for when the mouse button is released, ie "up"

  property OnMouseEnter;

  

Event handler for when the mouse enters the area of the current control

  property OnMouseLeave;

  

Event handler for when the mouse leaves the area of the current control

  property OnMouseWheel;

  

OnMouseWheel - event handler for a movement of the mouse wheel

  property OnMouseWheelDown;

  

OnMouseWheelDown - event handler for downward movement of mouse wheel

  property OnMouseWheelUp;

  

OnMouseWheelUp - event handler for upward movement of mouse wheel

  property OnResize;

  

Event Handler for resize of control

  property OnSelectionChange: TSelectionChangeEvent; [rw]

  

OnSelectionChange - event handler for changing the Item selected

  property OnUTF8KeyPress;

  property ParentFont;

  

ParentFont - should the control use the same font as the parent? Default is true

  property ParentShowHint;

  

ParentShowHint - does the control adopt the same hinting behaviour as its parent? Default is true

  property PopupMenu;

  

PopupMenu - a context-sensitive menu that pops up when the right mouse button is clicked over this control

  property SelCount: Integer; [r]

  

The number of selected iems in the drop-down list

  property Selected: Boolean; [rw]

  

Selected - whether the Item with given Index has been selected

  property ShowHint;

  

Flag to determine: Is hint to be displayed for this control?

  property Sorted: Boolean; [rw]

  

Sorted - whether the selected Items in the list have been arranged in alphabetical order

  property Style: TListBoxStyle; [rw]

  

Style of List Box - normal, owner-draw fixed, or owner-draw variable

  property TabOrder;

  

The place this control occupies in the list of tabs

  property TabStop;

  

Is the control in the sequence of controls accessed by successive presses of the Tab key?

  property TopIndex: Integer; [rw]

  

Topindex - the highest value of Index in this list

  property Visible;

  

Visible - can the control be seen?

end;

Inheritance

TCustomListBox

  

TCustomList Box : the base class for TListBox

|

TWinControl

  

The base class for all windowed controls

|

TControl

  

TControl - the main ancestor class for visual controls.

|

TLCLComponent

?

TObject

The latest version of this document can be found at lazarus-ccr.sourceforge.net.