Tuesday, December 11, 2007

Use a CheckBox instead of a ToggleButton for .Net windows form

Sometimes it is the little things that can drive you nuts. In VB6 I was used to having a ToggleButton control but I just went to use the equivalent in a .Net form for the first time and it was nowhere to be found.

Turns out that if you need this effect on a .Net winform, use the CheckBox control and set the Appearance property to "Button". The button appears "down" when Checked is true. Simple question, simple answer (once you find it).

Hope that helps.

Joe Kunk
Okemos, MI
USA

1 comment:

Anonymous said...

Thank you! This quick hint saved me a fair amount of trouble. :)