TToolBar: how to get rid of vertical bars?

浪子不回头ぞ 提交于 2019-12-08 08:04:21

问题


When I have a TToolbar and I put non-toolbutton controls on it, there is a superfluous vertical bar through the control. How can I get rid of the bar?

In the image below, the toolbar contains only two toolbuttons and a TLabel and no separators. Notice the vertical bar through the letter V.


回答1:


If I recall correctly, this is due to the handle of transparency of other non TToolButton controls that are placed in the TToolBar and, for this reason, if you set "Transparent" property of your TLabel to false, the vertical bar will disappear.




回答2:


you may want to try JVCL component suites (free) Delphi Jedi. It has a lot of visual components, including all sorts of panels & buttons. They also have panel with gradient colors, and image buttton for examples.




回答3:


Delphi XE2 Hot Update 4, Still got this bug, i work around this bug by :

  1. Setting TLabel.Autosize := False;
  2. TLabel.width := 50; --> just make sure its more than its caption, at least by 10 pixels
  3. TLabel.Alignment := taRightJustify

Thanks.



来源:https://stackoverflow.com/questions/10777219/ttoolbar-how-to-get-rid-of-vertical-bars

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!