Drop-on-form popup menu component with a collection of items, customisable appearance, and comprehensive draw and interaction events.
API unit family: TMSFNCPopupMenu
Inherits from: TTMSFNCCustomPopupMenu
Syntax
Generated Pascal C++ TTMSFNCPopupMenu = class(TTMSFNCCustomPopupMenu)
class PASCALIMPLEMENTATION TTMSFNCPopupMenu : public TTMSFNCCustomPopupMenu
Properties
Name
Description
AdaptToStyle
When True, the menu automatically adapts its appearance to the active IDE or application style. Default is False. (inherited from TTMSFNCCustomPopupMenu)
Appearance
Visual appearance settings for the popup menu panel and its items. (inherited from TTMSFNCCustomPopupMenu)
BitmapContainer
Bitmap container used to resolve bitmap names referenced by menu items. (inherited from TTMSFNCCustomPopupMenu)
IsOpen
When True, the menu popup is currently visible. (inherited from TTMSFNCCustomPopupMenu)
Items
Collection of top-level menu items. (inherited from TTMSFNCCustomPopupMenu)
Methods
Name
Description
AddMenuItem
Adds a new top-level item with the given text and type and returns it. (inherited from TTMSFNCCustomPopupMenu)
AddMenuSeparatorItem
Adds a separator as a top-level item and returns it. (inherited from TTMSFNCCustomPopupMenu)
GetCheckedMenuItemByGroupName
Returns the checked item in the radio group with the given name, or nil if none is checked. (inherited from TTMSFNCCustomPopupMenu)
GetMenuItemByText
Returns the first item whose Text matches the given string, or nil if not found. (inherited from TTMSFNCCustomPopupMenu)
Popup
Shows the menu at the specified screen coordinates. (inherited from TTMSFNCCustomPopupMenu)
SelectMenuItemControl
Programmatically selects the given item control in the open menu view. (inherited from TTMSFNCCustomPopupMenu)
Events
Name
Description
OnAfterDrawMenuItem
Fires after an item row has been drawn, allowing post-draw decoration. (inherited from TTMSFNCCustomPopupMenu)
OnAfterDrawMenuItemImage
Fires after the bitmap area of an item has been drawn. (inherited from TTMSFNCCustomPopupMenu)
OnAfterDrawMenuItemNote
Fires after the note text of an item has been drawn. (inherited from TTMSFNCCustomPopupMenu)
OnAfterDrawMenuItemText
Fires after the primary text of an item has been drawn. (inherited from TTMSFNCCustomPopupMenu)
OnBeforeDrawMenuItem
Fires before an item row is drawn; set ADefaultDraw to False to take over drawing entirely. (inherited from TTMSFNCCustomPopupMenu)
OnBeforeDrawMenuItemImage
Fires before the bitmap area of an item is drawn; set ADefaultDraw to False to take over drawing. (inherited from TTMSFNCCustomPopupMenu)
OnBeforeDrawMenuItemNote
Fires before the note text of an item is drawn; set ADefaultDraw to False to take over drawing. (inherited from TTMSFNCCustomPopupMenu)
OnBeforeDrawMenuItemText
Fires before the primary text of an item is drawn; set ADefaultDraw to False to take over drawing. (inherited from TTMSFNCCustomPopupMenu)
OnClose
Fires when the popup menu is closed. (inherited from TTMSFNCCustomPopupMenu)
OnGetFocusedSubControl
Fires to supply the control that should receive focus when the menu opens. (inherited from TTMSFNCCustomPopupMenu)
OnGetItemControlClass
Fires for each data item to allow substituting a custom TTMSFNCMenuItemControl subclass. (inherited from TTMSFNCCustomPopupMenu)
OnGetNumberOfPopupMenuItems
Fires to allow overriding the total number of top-level items displayed in the popup menu. (inherited from TTMSFNCCustomPopupMenu)
OnGetNumberOfSubMenuItems
Fires to allow overriding the number of sub-menu items displayed under the specified parent item. (inherited from TTMSFNCCustomPopupMenu)
OnGetPopupControl
Fires to supply a custom control that the menu is positioned relative to when opened. (inherited from TTMSFNCCustomPopupMenu)
OnItemCheck
Fires when an item's checked state changes; set the allow flag to False to cancel the check. (inherited from TTMSFNCCustomPopupMenu)
OnItemControlKeyDown
Fires when a key is pressed while an embedded control inside a menu item has focus. (inherited from TTMSFNCCustomPopupMenu)
OnItemControlMouseDown
Fires when a mouse button is pressed over an embedded control inside a menu item. (inherited from TTMSFNCCustomPopupMenu)
OnItemControlMouseUp
Fires when a mouse button is released over an embedded control inside a menu item. (inherited from TTMSFNCCustomPopupMenu)
OnItemKeyDown
Fires when a key is pressed while a menu item is selected. (inherited from TTMSFNCCustomPopupMenu)
OnItemMouseDown
Fires when a mouse button is pressed over a menu item. (inherited from TTMSFNCCustomPopupMenu)
OnItemMouseUp
Fires when a mouse button is released over a menu item. (inherited from TTMSFNCCustomPopupMenu)
OnMenuItemAdd
Fires before a menu item control is added to the view; set AAllow to False to suppress adding the item. (inherited from TTMSFNCCustomPopupMenu)
OnMenuItemClick
Fires when a menu item is clicked or activated by keyboard. (inherited from TTMSFNCCustomPopupMenu)
OnMenuItemControlAdded
Fires after a menu item control has been created and added to the menu view. (inherited from TTMSFNCCustomPopupMenu)
OnMenuItemSelectable
Fires for each item to determine whether it can be selected; set AIsSelectable to False to make the item non-selectable. (inherited from TTMSFNCCustomPopupMenu)
OnPopup
Fires immediately before the popup menu is displayed. (inherited from TTMSFNCCustomPopupMenu)
Used by