Do we have Button down property as Boolean
Asked Answered
E

1

5

I am assigned to convert delphi code to .Net, and was wondering if we have down property of button as in delphi has? As answered in this link How to make a Delphi TSpeedButton stay pressed if it's the only one in the group

Can we achieve this behavior in .Net Button control?

Energetic answered 29/3, 2012 at 18:46 Comment(0)
B
6

Try to use CheckBox control. Set Appearance property to Button to make it look like a toggle button.

Biafra answered 29/3, 2012 at 18:53 Comment(3)
+1. That's essentially the inverse of the Delphi model, which has a button that you tell to act like a check box, instead of a check box that you tell to look like a button. At the OS level, buttons and check boxes are the same control, so the two models are equivalent.Equi
TSpeedButton is not a standard Win32 API button, it is a custom-made custom-drawn control. TButton and TBitBtn are standard Win32 API buttons.Mirella
Thanks Alot, I never used that checkbox control act like a button, have learned new thing from you guys, Now I am using it. Thanks againEnergetic

© 2022 - 2024 — McMap. All rights reserved.