[英]Why does a TToolBar calculate button widths automatically when ShowCaption is set True?
[英]Why TToolBar doesn't want to wrap?
我在TToolBar
上放了一个TToolBar
,并添加了一些TSpeedButton
。 我确保将Wrapable
设置为true并运行该应用程序。 但是当我缩小表单时,按钮不会换行。 我想念什么? 我正在使用Delphi 2009。
您需要将TToolBar.AutoSize
设置为True
,并在按钮组之间添加分隔符,以便可以将工具栏拆分为多个部分。
最好也改用TToolButton
上的TToolBar
,因为它是为与它们一起使用而设计的。 右键单击工具栏,然后选择New Button
或New Separator
。 将要显示的图像分配给TImageList
,并将图像列表分配给TToolbar.Images
属性,然后为每个按钮设置ImageIndex
以显示列表中的图像。 (另一个优点是,您还可以将图像列表也分离到HotImages
和DisabledImages
属性。)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.