Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bi-State button

Status
Not open for further replies.

rebShaul

Programmer
Jun 22, 2003
15
0
0
IL
Hello.
How can I make a Bi-State button (a button that when you push it looks in one state - let's say pushed, and when you push it again it looks in another state - let's say pulled)?

Thanks,
Shaul.
 
As far as I know, you can only create toggle buttons(push=stays pushed) on a tool bar without actually creating your own button.
 
If you are looking for a quick fix you can always just adjust the Flatstyle of the button to "fake" the effect you want.

Code:
if (button1.FlatStyle == System.Windows.Forms.FlatStyle.Flat)
     button1.FlatStyle = System.Windows.Forms.FlatStyle.Standard;
else button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;

Regards,
John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top