Table of Contents

TTMSFNCDefaultToolBarButton Class

Default toolbar button that can display a bitmap and a caption, respond to hover/down states, and optionally open a dropdown popup. Used as the base class for all buttons in tool-bar components.

API unit family: TMSFNCToolBar Inherits from: TTMSFNCCustomToolBarElement Implements: ITMSFNCBitmapContainer

Syntax

TTMSFNCDefaultToolBarButton = class(TTMSFNCCustomToolBarElement, ITMSFNCBitmapContainer)

Properties

Name Description
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)
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)
DownState Programmatic down (pressed) state of the button. Set to True to keep the button visually pressed.
PopupPlacement Anchor side of the screen where the drop-down popup appears relative to the button.

Methods

Name Description
CloseDropDown Closes the drop-down popup if it is open.
Draw Renders the button onto the given graphics canvas within the specified rectangle.
DropDown Opens the drop-down popup associated with this button.
GetBitmap Returns the first bitmap from the Bitmaps collection, or nil if none is set.
GetPopupControl Returns the internal popup control used for drop-down content.