Table of Contents

TTMSFNCToolBarComboBox Class

Toolbar combo box that opens a TTMSFNCListBox-backed drop-down; the selected item text is shown on the button face.

API unit family: TMSFNCToolBar Inherits from: TTMSFNCToolBarCustomComboBox

Syntax

TTMSFNCToolBarComboBox = class(TTMSFNCToolBarCustomComboBox)

Properties

Name Description
Appearance Appearance settings controlling fill, stroke, and style for each interaction state. (inherited from TTMSFNCToolBarButton)
AutoBitmapSize When True, the bitmap is sized automatically based on the button height. (inherited from TTMSFNCToolBarButton)
AutoOptionsMenuText Caption used for this button's entry in the toolbar overflow (options) menu. (inherited from TTMSFNCToolBarButton)
BitmapContainer Shared bitmap container used to look up button bitmaps by name. Set this to avoid embedding bitmaps in each button individually. (inherited from TTMSFNCToolBarButton)
BitmapPosition Position of the bitmap relative to the button caption. (inherited from TTMSFNCToolBarButton)
BitmapSize Width and height of the button bitmap in pixels. Leave unset to use the default size derived from the button height. (inherited from TTMSFNCToolBarButton)
BitmapVisible When True, the button bitmap is visible. Set to False to show only the text label. (inherited from TTMSFNCToolBarButton)
Bitmaps Bitmaps shown in the normal state. Scale entries are chosen automatically based on screen DPI. (inherited from TTMSFNCToolBarButton)
CanCopy When True, this element can be copied to the compact popup toolbar. Set to False to exclude it from the compact view. (inherited from TTMSFNCCustomToolBarElement)
CompactLayout Layout applied when the toolbar is in compact mode and this button is shown in the compact popup. (inherited from TTMSFNCToolBarButton)
ControlIndex Zero-based index of this control within the toolbar's control list. Set internally during layout; do not change at runtime. (inherited from TTMSFNCCustomToolBarElement)
DisabledBitmaps Bitmaps shown when the button is disabled. (inherited from TTMSFNCToolBarButton)
DisabledFontColor Caption font color when the button is disabled. Defaults to gcNull. (inherited from TTMSFNCToolBarButton)
DownFontColor Caption font color when the button is in the pressed (down) state. Defaults to gcNull. (inherited from TTMSFNCToolBarButton)
DownState Programmatic down (pressed) state of the button. Set to True to keep the button visually pressed. (inherited from TTMSFNCDefaultToolBarButton)
DropDownAutoWidth When True, the drop-down popup width matches the button width automatically. (inherited from TTMSFNCToolBarButton)
DropDownControl Custom control to embed inside the button's drop-down popup. Assign any TControl descendant to show a custom picker or panel. (inherited from TTMSFNCToolBarButton)
DropDownHeight Fixed height of the drop-down popup in pixels. Leave unset to use the content height. (inherited from TTMSFNCToolBarButton)
DropDownKind Controls how the drop-down area of the button is rendered and activated. (inherited from TTMSFNCToolBarButton)
DropDownPosition Side of the button where the drop-down arrow is placed when DropDownKind is ddkDropDownButton. (inherited from TTMSFNCToolBarButton)
DropDownWidth Fixed width of the drop-down popup in pixels. Leave unset to use the content width (or DropDownAutoWidth). (inherited from TTMSFNCToolBarButton)
Editable When True, the user can type directly into the button to filter or set the value. (inherited from TTMSFNCToolBarCustomComboBox)
Font Font used to render the button caption. (inherited from TTMSFNCToolBarButton)
Hidden When True, the button is not shown in the main toolbar but may still appear in the overflow menu. (inherited from TTMSFNCToolBarButton)
HorizontalTextAlign Horizontal alignment of the button caption. (inherited from TTMSFNCToolBarButton)
HoverBitmaps Bitmaps shown when the mouse hovers over the button. (inherited from TTMSFNCToolBarButton)
HoverFontColor Caption font color when the mouse hovers over the button. Defaults to gcNull (use the default style color). (inherited from TTMSFNCToolBarButton)
Items String list of items displayed in the drop-down list. (inherited from TTMSFNCToolBarCustomComboBox)
LargeLayoutAutoBitmapSize When True, the large-layout bitmap size is calculated automatically based on the button height. (inherited from TTMSFNCToolBarButton)
LargeLayoutBitmapSize Width and height of the bitmap when the button is in large-layout (bblLarge) mode. (inherited from TTMSFNCToolBarButton)
LargeLayoutBitmaps Bitmaps shown in the large-layout (bblLarge) state at normal scale. (inherited from TTMSFNCToolBarButton)
LargeLayoutDisabledBitmaps Bitmaps shown in the large-layout state when the button is disabled. (inherited from TTMSFNCToolBarButton)
LargeLayoutHoverBitmaps Bitmaps shown in the large-layout state when the mouse hovers over the button. (inherited from TTMSFNCToolBarButton)
LastElement When True, this is the last element in the toolbar; used internally for layout boundary calculations. (inherited from TTMSFNCToolBarButton)
Layout Current layout override for this button. bblNone means the toolbar controls the layout. (inherited from TTMSFNCToolBarButton)
MaximumLayout Largest layout this button may adopt when the toolbar has room to expand. Defaults to bblLarge. (inherited from TTMSFNCToolBarButton)
MinimumLayout Smallest layout this button may adopt when the toolbar is shrinking. Defaults to bblBitmap. (inherited from TTMSFNCToolBarButton)
PopupPlacement Anchor side of the screen where the drop-down popup appears relative to the button. (inherited from TTMSFNCDefaultToolBarButton)
SelectedItemIndex Zero-based index of the currently selected item, or -1 if none. (inherited from TTMSFNCToolBarCustomComboBox)
ShowFocus When True, a focus rectangle is drawn around the button when it has keyboard focus. (inherited from TTMSFNCToolBarButton)
State Display state of this toolbar element — normal or large. (inherited from TTMSFNCToolBarButton)
StretchBitmapIfNoText When True and no text is assigned, the bitmap is stretched to fill the button area. (inherited from TTMSFNCToolBarButton)
StretchText When True, the caption is stretched horizontally to fill the button width. (inherited from TTMSFNCToolBarButton)
Text Caption text shown on the button face. Supports HTML markup. (inherited from TTMSFNCToolBarButton)
TextVisible When True, the button caption is visible. Set to False to show only the bitmap. (inherited from TTMSFNCToolBarButton)
Trimming Text trimming applied when the caption does not fit within the button bounds. (inherited from TTMSFNCToolBarButton)
VerticalTextAlign Vertical alignment of the button caption. (inherited from TTMSFNCToolBarButton)
WordWrapping When True, long captions wrap to a second line instead of being trimmed. (inherited from TTMSFNCToolBarButton)

Methods

Name Description
CloseDropDown Closes the drop-down popup if it is open. (inherited from TTMSFNCDefaultToolBarButton)
Draw Renders the button onto the given graphics canvas within the specified rectangle. (inherited from TTMSFNCDefaultToolBarButton)
DropDown Opens the drop-down popup associated with this button. (inherited from TTMSFNCDefaultToolBarButton)
GetBitmap Returns the first bitmap from the Bitmaps collection, or nil if none is set. (inherited from TTMSFNCDefaultToolBarButton)
GetDropDownButtonControl Returns the companion drop-down button rendered when DropDownKind is ddkDropDownButton, or nil otherwise. Returns the companion drop-down button rendered when DropDownKind is ddkDropDownButton, or nil otherwise. (inherited from TTMSFNCCustomToolBarButton)
GetPopupControl Returns the internal popup control used for drop-down content. (inherited from TTMSFNCDefaultToolBarButton)
LoadSettingsFromFile Loads button settings from a JSON file. (inherited from TTMSFNCCustomToolBarButton)
LoadSettingsFromStream Loads button settings from a stream containing JSON. (inherited from TTMSFNCCustomToolBarButton)

Events

Name Description
OnBeforeDropDown Fires before the drop-down popup opens. Use it to update popup content dynamically. (inherited from TTMSFNCToolBarButton)
OnCloseDropDown Fires when the drop-down popup closes. (inherited from TTMSFNCToolBarButton)
OnDropDown Fires when the drop-down popup opens. (inherited from TTMSFNCToolBarButton)
OnEditChange Fires when the user types in the editable field. (inherited from TTMSFNCToolBarCustomComboBox)
OnItemSelected Fires when the user selects an item from the drop-down list. (inherited from TTMSFNCToolBarCustomComboBox)

Used by