TTMSFNCToolBar Class
Container control that arranges toolbar buttons, separators, and picker controls in a horizontal row. Supports compact mode, overflow menus, drag-grip repositioning, and adaptive layout switching between normal and large states. TMS FNC Toolbar control: hosts buttons, separators, and picker controls in a horizontal or vertical strip, with compact overflow, options menu, and drag-grip support.
API unit family: TMSFNCToolBar
Inherits from: TTMSFNCCustomToolBar
Syntax
TTMSFNCToolBar = class(TTMSFNCCustomToolBar)
Properties
| Name | Description |
|---|---|
| Appearance | Appearance settings controlling fill, stroke, and style for each interaction state. (inherited from TTMSFNCCustomToolBar) |
| AutoAlign | When True, buttons are automatically aligned inside the toolbar as controls are added or removed. (inherited from TTMSFNCCustomToolBar) |
| AutoHeight | When True, the toolbar height adjusts automatically to match the tallest button. (inherited from TTMSFNCCustomToolBar) |
| AutoMoveToolBar | When True, dragging the toolbar grip repositions the toolbar automatically within its parent. (inherited from TTMSFNCCustomToolBar) |
| AutoSize | When True, the toolbar automatically adjusts its size to fit the contained controls. Equivalent to enabling both AutoHeight and AutoWidth. (inherited from TTMSFNCCustomToolBar) |
| AutoStretchHeight | When True, the toolbar stretches vertically to fill the height of its parent container. (inherited from TTMSFNCCustomToolBar) |
| AutoWidth | When True, the toolbar width adjusts automatically to fit all visible buttons. (inherited from TTMSFNCCustomToolBar) |
| CanCompact | When True, the toolbar is allowed to switch to compact mode when its width drops below CompactWidth. (inherited from TTMSFNCCustomToolBar) |
| Compact | When True, the toolbar is displayed in compact mode — a single button that expands to a popup on click. (inherited from TTMSFNCCustomToolBar) |
| CompactAppearance | Visual appearance settings for the compact button shown when the toolbar is in compact mode. (inherited from TTMSFNCCustomToolBar) |
| CompactAutoBitmapSize | When True, the compact button bitmap size is calculated automatically based on the button height. (inherited from TTMSFNCCustomToolBar) |
| CompactBitmapSize | Size of the bitmap shown on the compact button, in pixels. (inherited from TTMSFNCCustomToolBar) |
| CompactBitmapVisible | When True, the compact button shows its bitmap. Requires at least one entry in CompactBitmaps. (inherited from TTMSFNCCustomToolBar) |
| CompactBitmaps | Bitmaps shown on the compact button face when the toolbar is in compact mode. (inherited from TTMSFNCCustomToolBar) |
| CompactWidth | Width of the compact button in pixels. Used only when Compact is True. (inherited from TTMSFNCCustomToolBar) |
| CustomOptionsMenu | Custom popup menu to show instead of the auto-generated overflow menu when overflow occurs. (inherited from TTMSFNCCustomToolBar) |
| DisabledFontColor | Font color used for the toolbar label text when the toolbar is disabled. Defaults to gcNull (use system color). (inherited from TTMSFNCCustomToolBar) |
| Font | Font used to render the toolbar label text. (inherited from TTMSFNCCustomToolBar) |
| HorizontalTextAlign | Horizontal alignment of the toolbar label text. (inherited from TTMSFNCCustomToolBar) |
| MinimumWidth | Minimum toolbar width in pixels. The toolbar will not shrink below this value even when compacting. (inherited from TTMSFNCCustomToolBar) |
| OptionsMenu | Options that control the appearance and behavior of the overflow (options) menu button shown when buttons overflow. (inherited from TTMSFNCCustomToolBar) |
| QuickMenuButton | When True, a small quick-access menu button is shown at the left edge of the toolbar. (inherited from TTMSFNCCustomToolBar) |
| QuickMenuButtonAppearance | Visual appearance settings for the quick-access menu button. (inherited from TTMSFNCCustomToolBar) |
| QuickMenuButtonHint | Hint string shown when the user hovers over the quick-access menu button. (inherited from TTMSFNCCustomToolBar) |
| State | Display state of this toolbar element — normal or large. (inherited from TTMSFNCCustomToolBar) |
| Text | Optional label text rendered inside the toolbar. Supports HTML markup. (inherited from TTMSFNCCustomToolBar) |
| Trimming | Text trimming style applied when the label does not fit within the available width. (inherited from TTMSFNCCustomToolBar) |
| Version | Version string of the toolbar component. (inherited from TTMSFNCCustomToolBar) |
| VerticalTextAlign | Vertical alignment of the toolbar label text. (inherited from TTMSFNCCustomToolBar) |
| WordWrapping | When True, the toolbar label text wraps to multiple lines. (inherited from TTMSFNCCustomToolBar) |
Methods
| Name | Description |
|---|---|
| AddBitmapPicker | Creates and adds a TTMSFNCToolBarBitmapPicker to the toolbar. (inherited from TTMSFNCCustomToolBar) |
| AddColorPicker | Creates and adds a TTMSFNCToolBarColorPicker to the toolbar. (inherited from TTMSFNCCustomToolBar) |
| AddCustomControl | Adds an existing control instance to the toolbar at the given position. (inherited from TTMSFNCCustomToolBar) |
| AddCustomControlClass | Creates a new control of the specified class, adds it to the toolbar, and returns the new instance. (inherited from TTMSFNCCustomToolBar) |
| AddFontNamePicker | Creates and adds a TTMSFNCToolBarFontNamePicker to the toolbar. (inherited from TTMSFNCCustomToolBar) |
| AddFontSizePicker | Creates and adds a TTMSFNCToolBarFontSizePicker to the toolbar. (inherited from TTMSFNCCustomToolBar) |
| AddItemPicker | Creates and adds a TTMSFNCToolBarItemPicker to the toolbar. (inherited from TTMSFNCCustomToolBar) |
| AddSeparator | Creates and adds a TTMSFNCToolBarSeparator to the toolbar. (inherited from TTMSFNCCustomToolBar) |
| Build | Rebuilds all toolbar controls and their layout. Call after programmatically adding or removing items at runtime. (inherited from TTMSFNCCustomToolBar) |
| CanExpand | Returns True if the toolbar can be expanded to show more buttons than are currently visible. (inherited from TTMSFNCCustomToolBar) |
| CanShrink | Returns True if the toolbar can be shrunk to hide overflow buttons into the options menu. (inherited from TTMSFNCCustomToolBar) |
| CloseCompactPopup | Closes the compact toolbar popup if it is currently open. (inherited from TTMSFNCCustomToolBar) |
| Draw | Renders the toolbar background, drag grip, and separator line. (inherited from TTMSFNCCustomToolBar) |
| DropDownActive | Returns True if any button on the toolbar currently has an open drop-down popup. (inherited from TTMSFNCCustomToolBar) |
| GetOptionsMenuButtonControl | Returns the internal drop-down button used for the overflow (options menu) at the right edge of the toolbar. (inherited from TTMSFNCCustomToolBar) |
Events
| Name | Description |
|---|---|
| OnAnchorClick | Fires when the user clicks an HTML anchor in the toolbar label text. (inherited from TTMSFNCCustomToolBar) |
| OnCompactClick | Fires when the user clicks the compact button to expand or collapse the toolbar popup. (inherited from TTMSFNCCustomToolBar) |
| OnCustomizeCompactToolBar | Fires after the compact popup toolbar is created, allowing its layout to be customized before it appears. (inherited from TTMSFNCCustomToolBar) |
| OnDragGripMoving | Fires continuously while the user drags the toolbar by its grip handle. (inherited from TTMSFNCCustomToolBar) |
| OnIsLastElement | Fires for each toolbar element to allow the application to override whether it is treated as the last visible item. (inherited from TTMSFNCCustomToolBar) |
| OnOptionsMenuButtonClick | Fires when the user clicks the overflow menu button. (inherited from TTMSFNCCustomToolBar) |
| OnOptionsMenuCustomize | Fires before the overflow menu is displayed, allowing the entire popup menu to be customized. (inherited from TTMSFNCCustomToolBar) |
| OnOptionsMenuItemApplyStyle | Fires when a style is applied to an overflow menu item (FMX only). (inherited from TTMSFNCCustomToolBar) |
| OnOptionsMenuItemCanShow | Fires for each hidden toolbar control to decide whether its overflow menu item should be shown. (inherited from TTMSFNCCustomToolBar) |
| OnOptionsMenuItemClick | Fires when the user selects an item from the overflow menu. (inherited from TTMSFNCCustomToolBar) |
| OnOptionsMenuItemCustomize | Fires for each item added to the overflow menu, allowing per-item appearance customization. (inherited from TTMSFNCCustomToolBar) |
| OnQuickMenuButtonClick | Fires when the user clicks the quick-access menu button. (inherited from TTMSFNCCustomToolBar) |