Reply
Solved! Go to solution

How to Add Toggle Button to a Ribbon Menu

[ Edited ]

Hi All,

 

I have recently started programing with Solid Edge.

 

Firstly "THANK YOU". The "Developer Forum" AND "The SolidEdgeCommunity by Jason Newel & Nathan Emler" helped me a lot in getting started.

 

I need to add a "Toggle Button"  to my Ribbon menu, which will represent a boolean value to my custom Addin.

 

How can i add toggle buttons?

 

I am using the Addin template from SolidEdgeCommunity GitHub.

 

Regards

Santosh

Regards,
Santosh
2 REPLIES
Solution
Solution
Accepted by topic author santosh0114
‎08-26-2015 04:32 AM

Re: How to Add Toggle Button to a Ribbon Menu

Piece of cake since you're using the community templates. Here is the code to toggle the check state of a button.

 

C#

void _button1_Click(RibbonControl control)
{
    _button1.Checked = !_button1.Checked;
}

 Visual Basic

Private Sub _button1_Click(ByVal control As RibbonControl)
	_button1.Checked = Not _button1.Checked
End Sub

 

Jason Newell
Applications Architect
www.jasonnewell.net

Re: How to Add Toggle Button to a Ribbon Menu

Thank You

Regards,
Santosh