| Description | Hierarchy | Fields | Methods | Properties |
type TGUIListBox = class(TGUIElement)
Default list box GUI element.
![]() |
function AddItem(const Text: StringType; Icon: LongInt=-1): LongWord; inline; |
![]() |
function GetItemDefaultColor(ColorType: TGUIListBoxColor): TARGBColor; inline; |
![]() |
function GetItemIcon(Index: LongWord): LongInt; inline; |
![]() |
function GetItemOverrideColor(Index: LongWord; ColorType: TGUIListBoxColor): TARGBColor; inline; |
![]() |
function GetItemText(Index: LongWord): StringType; inline; |
![]() |
function HasItemOverrideColor(Index: LongWord; ColorType: TGUIListBoxColor): Boolean; inline; |
![]() |
function InsertItem(Index: LongWord; const Text: StringType; Icon: LongInt=-1): LongInt; inline; |
![]() |
procedure Clear; inline; |
![]() |
procedure ClearItemOverrideColor(Index: LongWord); overload; inline; |
![]() |
procedure ClearItemOverrideColor(Index: LongWord; ColorType: TGUIListBoxColor); overload; inline; |
![]() |
procedure RemoveItem(Index: LongWord); inline; |
![]() |
procedure SelectItem(const Text: StringType); overload; inline; |
![]() |
procedure SelectItem(Index: LongWord); overload; inline; |
![]() |
procedure SetItemOverrideColor(Index: LongWord; Color: TARGBColor); overload; inline; |
![]() |
procedure SetItemOverrideColor(Index: LongWord; ColorType: TGUIListBoxColor; Color: TARGBColor); overload; inline; |
![]() |
procedure SetItemProperties(Index: LongWord; const Text: StringType; Icon: LongInt=1); inline; |
![]() |
procedure SetSpriteBank(Bank: TGUISpriteBank); inline; |
![]() |
procedure SwapItems(Index1, Index2: LongWord); inline; |
![]() |
property AutoScroll: Boolean read IsAutoScrollEnabled write SetAutoScrollEnabled; |
![]() |
property DrawBackground: Boolean write SetDrawBackground; |
![]() |
property ItemCount: LongWord read GetItemCount; |
![]() |
property ItemHeight: LongInt write SetItemHeight; |
![]() |
property SelectedItem: LongInt read GetSelected; |
![]() |
function AddItem(const Text: StringType; Icon: LongInt=-1): LongWord; inline; |
|
Adds an list item with an icon. Parameters
ReturnsThe ID of the new created item. | |
![]() |
function GetItemDefaultColor(ColorType: TGUIListBoxColor): TARGBColor; inline; |
|
Resolves a TGUIListBoxColor to the color used by default. Parameters
ReturnsThe default color which is used for the given ColorType. This value can be overridden by calling SetItemOverrideColor. | |
![]() |
function GetItemIcon(Index: LongWord): LongInt; inline; |
|
Returns the icon of an item. ReturnsThe index of the item's index in the associated GUISpriteBank. If there is none, -1 will be returned. | |
![]() |
function GetItemOverrideColor(Index: LongWord; ColorType: TGUIListBoxColor): TARGBColor; inline; |
|
Gets the real color an item uses to draw a default color. Parameters
ReturnsThe overridden color value, if any, else the default color. | |
![]() |
function GetItemText(Index: LongWord): StringType; inline; |
|
Returns the caption for an Item. | |
![]() |
function HasItemOverrideColor(Index: LongWord; ColorType: TGUIListBoxColor): Boolean; inline; |
|
Checks whether a color type is overridden on an item. Parameters
ReturnsTrue if the default color is overridden, False otherwise. | |
![]() |
function InsertItem(Index: LongWord; const Text: StringType; Icon: LongInt=-1): LongInt; inline; |
|
Inserts a new item at a given index. Parameters
ReturnsThe index of the new item on success, -1 on failure. | |
![]() |
procedure Clear; inline; |
|
Clears the list, deleting all items in the listbox. | |
![]() |
procedure ClearItemOverrideColor(Index: LongWord); overload; inline; |
|
Clears all overridden colors for an item. Parameters
| |
![]() |
procedure ClearItemOverrideColor(Index: LongWord; ColorType: TGUIListBoxColor); overload; inline; |
|
Clears a single overridden color for an item. Parameters
| |
![]() |
procedure RemoveItem(Index: LongWord); inline; |
|
Returns an item. Parameters
| |
![]() |
procedure SelectItem(const Text: StringType); overload; inline; |
|
Selects an item by caption. Parameters
| |
![]() |
procedure SelectItem(Index: LongWord); overload; inline; |
|
Selects an item by index. Parameters
| |
![]() |
procedure SetItemOverrideColor(Index: LongWord; Color: TARGBColor); overload; inline; |
|
Overrides all default colors for an item with the same value. Parameters
| |
![]() |
procedure SetItemOverrideColor(Index: LongWord; ColorType: TGUIListBoxColor; Color: TARGBColor); overload; inline; |
|
Overrides a default color for a single item. Parameters
| |
![]() |
procedure SetItemProperties(Index: LongWord; const Text: StringType; Icon: LongInt=1); inline; |
|
Replaces an existing item with a new one. Parameters
| |
![]() |
procedure SetSpriteBank(Bank: TGUISpriteBank); inline; |
|
Sets the sprite bank which should be used to draw list icons. This font is set to the sprite bank of the built-in-font by default. A sprite can be displayed in front of every list item. An icon is an index within the icon sprite bank. Several default icons are available in the skin through GetIcon. | |
![]() |
procedure SwapItems(Index1, Index2: LongWord); inline; |
|
Swaps two items. Parameters
| |
![]() |
property AutoScroll: Boolean read IsAutoScrollEnabled write SetAutoScrollEnabled; |
|
Specifies whether the list box should scroll automatically when an otherwise invisible item is selected. | |
![]() |
property DrawBackground: Boolean write SetDrawBackground; |
|
Specifies whether the list box should draw its own background, or if it will be transparent. | |
![]() |
property ItemCount: LongWord read GetItemCount; |
|
The currrent item count. | |
![]() |
property ItemHeight: LongInt write SetItemHeight; |
|
Sets the default item height in pixels. | |
![]() |
property SelectedItem: LongInt read GetSelected; |
|
The ID of the selected item, if any, else -1. | |