如果组中只有一个,如何使Delphi TSpeedButton保持按下状态 [英] How to make a Delphi TSpeedButton stay pressed if it's the only one in the group

查看:71
本文介绍了如果组中只有一个,如何使Delphi TSpeedButton保持按下状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不确定为什么TSpeedButton具有此属性,但是当TSpeedButton是给定groupindex的唯一按钮时,无论是否按下 AllowAllUp,它都不会保持按下状态。也许一个绝地的控制就足够了,但是希望有一些解决办法。

I'm not sure why the TSpeedButton has this property but when a TSpeedButton is the only button of a given groupindex, it doesn't stay pressed, whether or not "AllowAllUp" is pressed. Maybe a Jedi control would suffice, but hopefully there's some fix. Any help or anecdotes are appreciated.

顺便说一句,我(仍)在使用Delphi 7,不确定这是否是一个全面的难题。

BTW, I'm (still) using Delphi 7, not sure if this is an across the board conundrum.

推荐答案

我在这里没有D7,但在D2006中,如果GroupIndex的值> 0,则Speedbutton保持按下状态。

I have no D7 here, but in D2006 a Speedbutton stays down if the GroupIndex has a value > 0.

如果这不是您想要的行为,则可以在OnClick-Eventhandler中手动设置Down-Property(确保GroupIndex为0)。

If this is not the behaviour you wish, you can set the Down-Property manually in the OnClick-Eventhandler (make sure, that the GroupIndex is 0).

这篇关于如果组中只有一个,如何使Delphi TSpeedButton保持按下状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆