Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 693869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:47:53+00:00 2026-05-14T02:47:53+00:00

I noticed that the height of a TToolButton increases when you set the button’s

  • 0

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 http://img440.imageshack.us/img440/1462/ttoolbar02.png
alt text http://img291.imageshack.us/img291/966/ttoolbar01.png

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T02:47:53+00:00Added an answer on May 14, 2026 at 2:47 am

    It’s part of the underlying Windows control. A quick look into ComCtrls shows that changing the TToolButton.Style calls it’s SetStyle method. If, in SetStyle, ShowCaptions is True then the TToolBar.ButtonWidth and ButtonHeight are both set to 0, and TToolButton.RecreateButtons is called.

    RecreateButtons, in turn, calls TToolBar.ResizeButtons, which simply sends (posts) a message to the ToolBar using

    Perform(TB_AUTOSIZE, 0, 0);
    

    TB_AUTOSIZE is intended to be used, according to MSDN,

    after causing the size of a toolbar to change either by setting the button or bitmap size or by adding strings for the first time.

    Since SetStyle sets both the ButtonWidth and ButtonHeight to 0, this message would seem to be correctly sent.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I noticed that in Java, you can use a class which has members of
I noticed that Facebook added a place to explicitly set the height of the
I just noticed that if you give an HTML button a fixed width, the
I noticed that the RichEditableText component has a default height and vertical content scrolling
I noticed that IE 9 does not support application cache. How can I use
I noticed that I can't combine --traditional options with the other one letter other
Creating a calculator-like dialog, I noticed that quickly clicking on a button in IE
For a long time I've noticed that adjusting line-height and adding some extra space
I have a footer that has position absolute: #footer { position:absolute; bottom:0; height: 43px;
I've noticed that QML can receive a signal emitted from Python by using the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.