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.
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).
I just tried that in Delphi 7 (Build 4.453):
TSpeedButton
to formAllowAllUp := true;
GroupIndex := 1;
When clicking the button it toggles its down state without any other code needed.
knight_killer is correct. i can tell you it'll work in any version of delphi:
object SpeedButton1: TSpeedButton
Left = 152
Top = 384
Width = 23
Height = 22
AllowAllUp = True
GroupIndex = 99
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With