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?

Community
  • 1
  • 1
Syed
  • 308
  • 1
  • 4
  • 12

1 Answers1

6

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

default locale
  • 13,035
  • 13
  • 56
  • 62
  • 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. – Rob Kennedy Mar 29 '12 at 20:25
  • 1
    `TSpeedButton` is not a standard Win32 API button, it is a custom-made custom-drawn control. `TButton` and `TBitBtn` are standard Win32 API buttons. – Remy Lebeau Mar 29 '12 at 21:53
  • 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 again – Syed Mar 30 '12 at 13:19