TToolButton.CheckMenuDropdown function
Checks for and executes a drop-down menu for the tool button.
Declaration
function CheckMenuDropdown: Boolean; virtualDescription
CheckMenuDropdown is a
Boolean function used to check
whether a drop-down menu can be displayed and executed for the tool button.
The menu can be represented using either the
DropDownMenu property
(with its
AutoPopUp property set to
True) or the
MenuItem property.
No actions are performed in the method at design-time, when the parent tool bar has not been assigned, or when neither DropDownMenu nor MenuItem has been assigned.
When a menu is available, the flags for the tool button are updated to
include the value tbfDropDownMenuShown. The CheckMenuDropdown
method in the parent tool bar is called to display and execute the drop-down
menu, and get the return value for the method. The return value is
True if the menu was successfully display and executed by the parent
tool bar. The button flags are reverted prior to exiting from the method.
CheckMenuDropdown is called from the MouseDown method when the
left mouse button is clicked on a button (or its drop-down indicator).
See also
An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.
