在同一行打印速度按钮和按钮标题的最简单方法

发布于 2024-10-09 04:16:01 字数 248 浏览 0 评论 0原文

我的应用程序中有一个屏幕,其中连续有 5 个按钮,其中一个是速度按钮,几乎仅用于样式。它们的高度和宽度相同,但速度按钮打印 1 个像素。这真的让我很恼火,因为这个屏幕是我们的用户一直看到的。在 Delphi 2009 中,我相信按钮有一个边距选项,Delphi 7 中有一个边距,但它只改变左边距。 Delphi 7有办法解决这个问题吗?我是否错误地重新调整了速度按钮的用途?

请注意,这不是一个技巧面试问题,尽管听起来像是这样,请重新穿上靴子。

There's a screen in my app where I've got 5 buttons in a row, one of them is a speed button which is pretty much just used for style. They are identical height and width but the speed button prints down 1 pixel. This really irks me as this screen is something our users see all the time. In Delphi 2009 I believe there is a margin option for buttons, there is a margin in Delphi 7 but it only changes the left margin. Is there a Delphi 7 way to fix this problem? Am I erroneously re-purposing the speedbutton?

Note, this is not a trick interview question even though it sounds like it, put your boots back on.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

画▽骨i 2024-10-16 04:16:02

是的,Margin 属性确实会更改 TSpeedButton 标题的左边距,但前提是 Layout 属性设置为 blGlyphLeft,默认设置为

Layout 更改为 blGlyphTopblGlyphBottom,您将能够相应地调整标题的顶部或底部边距。

Yes, the Margin property does change the left margin of a TSpeedButton's caption, but only when the Layout property is set to blGlyphLeft, which it is set to by default.

Change Layout to either blGlyphTop or blGlyphBottom, and you will be able to adjust, correspondingly, the top or the bottom margin of the caption.

埋情葬爱 2024-10-16 04:16:02

如果五个按钮并排在一起,用户会期望它们都以一致的方式工作。我建议不要将 TButton 和 TSpeedButton 混合在同一组中。将 TSpeedButton 替换为 TButton,然后单独处理样式问题(无论是什么)。

With five buttons in a row together, trhe user would expect that they all work in a consistent manner. I would counsel against mixing TButtons and TSpeedButtons in the same group. Replace the TSpeedButton with a TButton, and then deal with the style issue (whatever that is) separately.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文