简体   繁体   中英

3 TToolBar's on a TCoolbar band

I have TCoolBar with two bands. On the first band I want to put 3 separate TToolBar's in it. I take TToolBar in TCoolBar and set align to alNone but cannot adjust the size of TCoolBar. I look at my Delphi 5 and it uses TControlBar that the sites tell me to avoid. I'm installing Speed buttons on my Toolbar with spaces and separators to get flat button effects. has any one got a good solution to this problem Thanks in advance.

I can't replicate your problem. Here's what I did (exactly):

  • Started Delphi 7, which gave me a new blank VCL forms application
  • Dropped a TCoolBar on the form, and then dropped three TToolBars on the CoolBar.
  • Hit Escape to change the designer's focus from the last dropped ToolBar.
  • Used Shift+DownArrow to increase the height of the CoolBar so that all the ToolBars were visible.

EDIT: After posting this, I also tried setting the TCoolBar.AutoSize property to True instead of manually resizing as the last step above describes. This also worked properly.

I don't know what

I look at my Delphi 5 and it uses TControlBar that the sites tell me to avoid.

means. What "sites", and why "avoid"? If you're telling us that the Delphi 5 IDE uses TControlBar, IIRC D5's IDE worked just fine.

Also, don't use SpeedButtons on a TToolBar. A TToolBar is designed to hold TToolButtons, which you can put on the TToolBar by right-clicking it and choosing either "New Button" or "New Separator" from the context menu.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM