.net Costom Button

How to create and listen to a button (in Component Properties Windows) via .net?

Please, Help :smile:
Any suggestions?

If you just want a simple button, you can add a button property (IButtonProperty) to the component and register to its OnClick event.

@TSy, Could you please give an example on how to implement that?

What i’ve tried so far, but did not work:

ISimComponent comp= e.Component.RootNode.Component;
IButtonProperty button = (IButtonProperty)comp.CreateProperty(typeof(ButtonType), PropertyConstraintType.NotSpecified, "myButton");
IProperty<ButtonType> button = (IProperty<ButtonType>)comp.CreateProperty(typeof(ButtonType), PropertyConstraintType.NotSpecified, "myButton");