
I’m using Delphi 2010 and I have a TToolButton contained by a TToolBar. Assigned to the ‘DropdownMenu’ property of my TToolButton is a standard TPopupMenu.
The only way I can get the menu to appear is to click on the area pointed to by the red arrow in the image. Currently, clicking the area pointed to by the green arrow shows the button as pressed, but the dropdown menu does not appear.
What I want is if the user clicks anywhere (pointed to by green arrow or red arrow) for the menu to appear. Is it possible to enable this functionality?
The idea of the
tbsDropDownstyle is to have a button that triggers some default action when clicked, but provides more variations of that action in the drop down menu.If you don’t care about the down arrow disappearing, you can set the style to
tbsButtonand no matter where the button is clicked, it will show the popup menu.If you are like me and you do want to have the arrow there to indicate that there are more options behind this button, you can call
CheckMenuDropdownin the button’sOnClickedevent handler.