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 you can call Queue.Synchronize to get a thread-safe queue object, but
I noticed that my Designer.vb file of one of my forms has a lot
I noticed that there is one change about ASP.NET Routing. I cannot understand why
Just noticed that the style of the navigation menu on windows.com is just what
I noticed that I can start a program with it's associated handler by writing
Salam, Can any one help me please with the WPF Ribbon, I noticed that
I noticed that Google maps is providing directions in my local language (hungarian) when
We noticed that lots of bugs in our software developed in C# (or Java)
i noticed that paypal displays a very different favicon, one that's not just a
I noticed that the generic IEnumerator<T> inherits from IDisposable, but the non-generic interface IEnumerator

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.