How to make a Delphi TSpeedButton stay pressed if it's the only one in the group

Peter Turner picture Peter Turner · Oct 14, 2008 · Viewed 27.9k times · Source

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.

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

Answer

Roman Ganz picture Roman Ganz · Oct 14, 2008

I have no D7 here, but in D2006 a Speedbutton stays down if the GroupIndex has a value > 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).