TToolButton Height Grows with Style = tbsDropdown

Posted by smartins on Stack Overflow See other posts from Stack Overflow or by smartins
Published on 2010-03-26T09:13:43Z Indexed on 2010/03/26 12:53 UTC
Read the original article Hit count: 263

Filed under:

I noticed that the height of a TToolButton increases when you set the button's Style to tbsDropdown. I can understand the width increasing, so the button has space to draw the down arrow, but I'm not sure a height increase is necessary.

Steps to reproduce the issue (Delphi 2010, Windows 7 x64):

  • Add TToolbar to a form, ShowCaptions=True
  • Right click to add a button to the Toolbar
  • Set button Style=tbsDropDown and notice the button grows in height

The same height increase happens when there are images assigned to the toolbar, in which case there is already plenty more vertical space available in the button to draw the drop down.

Here's a visual example: alt text alt text

Is there a workaround for this without hacking the VCL, or is this hardcoded into the Windows control?

© Stack Overflow or respective owner

Related posts about delphi