简体   繁体   English

TCoolbar乐队上的3个TToolBar

[英]3 TToolBar's on a TCoolbar band

I have TCoolBar with two bands. 我有两个乐队的TCoolBar。 On the first band I want to put 3 separate TToolBar's in it. 在第一个波段上,我想在其中放置3个单独的TToolBar。 I take TToolBar in TCoolBar and set align to alNone but cannot adjust the size of TCoolBar. 我在TCoolBar中使用TToolBar并将align设置为alNone,但是无法调整TCoolBar的大小。 I look at my Delphi 5 and it uses TControlBar that the sites tell me to avoid. 我看一下我的Delphi 5,它使用了TControlBar,网站告诉我避免使用它。 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 启动Delphi 7,这给了我一个新的空白VCL表单应用程序
  • Dropped a TCoolBar on the form, and then dropped three TToolBars on the CoolBar. 在窗体上放置一个TCoolBar,然后在CoolBar上放置三个TToolBar。
  • Hit Escape to change the designer's focus from the last dropped ToolBar. 点击Escape键,可以从上次放置的工具栏更改设计者的焦点。
  • Used Shift+DownArrow to increase the height of the CoolBar so that all the ToolBars were visible. 使用Shift + DownArrow可以增加CoolBar的高度,以便所有ToolBar都可见。

EDIT: After posting this, I also tried setting the TCoolBar.AutoSize property to True instead of manually resizing as the last step above describes. 编辑:发布此内容后,我还尝试将TCoolBar.AutoSize属性设置为True,而不是按照上面的最后一步所述手动调整大小。 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. 我看一下我的Delphi 5,它使用了TControlBar,网站告诉我避免使用它。

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. 如果您告诉我们Delphi 5 IDE使用TControlBar,则IIRC D5的IDE可以正常工作。

Also, don't use SpeedButtons on a TToolBar. 另外,请勿在TToolBar上使用SpeedButtons。 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. TToolBar旨在容纳TToolButton,您可以通过右键单击它并从上下文菜单中选择“新建按钮”或“新建分隔符”,将其放置在TToolBar上。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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