How to Add Toggle Button to a Ribbon Menu

Builder
Builder

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

Re: How to Add Toggle Button to a Ribbon Menu

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

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

Builder
Builder

Thank You

Regards,
Santosh