Table of Contents

TTMSFNCListBoxItem Class

A single item in a TTMSFNCListBox, holding display text, an optional bitmap, text appearance overrides, and application-defined data.

API unit family: TMSFNCListBox Inherits from: TCollectionItem

Syntax

TTMSFNCListBoxItem = class(TCollectionItem)

Properties

Name Description
Bitmap Optional bitmap displayed next to the item text.
BitmapContainer Read-only reference to the bitmap container used to resolve BitmapName.
BitmapHeight Pixel height reserved for the item bitmap; pass 0 to use the natural bitmap height.
BitmapName Name of the bitmap in the bitmap container to use as the item image.
BitmapWidth Pixel width reserved for the item bitmap; pass 0 to use the natural bitmap width.
Checked When True, a check mark is shown next to the item text.
DBKey Unique string key used to identify this item in a database-adapter scenario.
DataBoolean General-purpose Boolean for application use.
DataInteger General-purpose integer for application use.
DataObject General-purpose object reference for application use.
DataPointer General-purpose pointer for application use.
DataString General-purpose string for application use.
DisabledTextColor Text color when the item is disabled.
Enabled When False, the item is grayed out and cannot be selected or clicked.
Height Item height in pixels; pass 0 to use the list box's fixed height setting.
SelectedTextColor Text color when the item is selected.
StrippedHTMLText Item text with all HTML tags stripped, suitable for plain-text processing.
Tag General-purpose integer tag for application use.
Text Display text of the item; supports HTML formatting.
TextAlign Horizontal alignment of the item text within the item row.
TextColor Text color in the item's normal (unselected) state.
Trimming Controls how overlong item text is trimmed when word-wrapping is disabled.
WordWrapping When True, the item text wraps to multiple lines when it exceeds the item width.

Methods

Name Description
AssignData Copies only the data properties (DataPointer, DataBoolean, DataObject, DataString, DataInteger) from another item.
IsSelected Returns True when this item is currently selected in the list box.
ListBox Returns the list box that owns this item.
LoadFromString Restores the item from a string produced by SaveToString.
SaveToString Serializes the item to a string for persistence.

Used by