压平 TSpeedButton?

发布于 2024-07-24 04:30:10 字数 259 浏览 3 评论 0原文

无论如何,有没有强制 TSpeedButton 重新绘制平坦?

使用触摸屏显示器时,鼠标不会移出按钮,因此即使单击其他按钮,凸起的边框也会保留在屏幕上。

Is there anyway to force a TSpeedButton to be redrawn flat?

When using a touch screen monitor, the mouse does not move out of the button, so the raised border stays on screen, even when you click on a different button.

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

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

发布评论

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

评论(2

孤独岁月 2024-07-31 04:30:10

看起来这不是我可以在没有触摸屏的情况下重现的东西,但如果我理解正确的话,当有人触摸按钮时,它会变热(如果 Down 为真则上升,或突出显示),但是当他们触摸时另一个按钮不会触发鼠标退出,因此它会保持热状态。 那是对的吗?

有几种方法可以解决这个问题。 最简单的可能是在每个单击事件上调用一个将鼠标从按钮上移开的方法。

Mouse.CursorPos := Point(0,0);

如果这还不够,那么您可以禁用单击的按钮,将鼠标移开,刷新它,然后重新启用它。 禁用的按钮不可能很热。您可能需要一个计时器,在鼠标移开按钮被禁用一秒钟后启用该按钮,但我敢打赌,只需移动鼠标就足够了。

另外,当鼠标光标停留在我刚刚触摸的按钮上时,我一直认为这是奶酪,所以这将使您的触摸系统看起来更优雅。

It doesn't look like this is something I can reproduce without a touch screen, but if I understand you correctly, when someone touches a button then it goes hot (either rising up if Down is true, or highlighting), but when they touch another button it doesn't trigger the mouse exit so it stays hot. Is that correct?

There are a couple ways to fix this. Probably the simplest is on each click event make a call top a method that moves the mouse off off the button.

Mouse.CursorPos := Point(0,0);

If that is not enough then you can disable the button that was clicked on, move the mouse off, refresh it, and re-enable it. A disabled button cannot be hot. You might want a timer that enables the button after it was disabled for a second with the mouse moved off of it, but I am betting that just moving the mouse will be enough.

Additionally I always thought it was cheese when a mouse cursor was left on the button that I just touched, so this will make your touch system look classier.

风蛊 2024-07-31 04:30:10

您是否尝试将 Flat 属性设置为 True ?

Did you try setting Flat property to True?

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