MainPanel OnPaneActivate

I need to run logic when a user changes from one panel to another.
There is an option to see the current panel, but I need to trigger the code when a new panel is activated. There is a protected method called MainPanel.OnPaneActivate, but I can’t figure out how to add that event handler.
I need some good C# help :slight_smile:

I use the Enter event to detect. Add it for each panel.

private EpiBasePanel Panel_1;

In InitialiseCode:
Panel_1 = (EpiBasePanel) csm.GetNativeControlReference("fafa6c8e-7b71-44ea-b7bd-31f8747bd7e0"); 
//where the number is the GUID of the control for each panel you need to act on upon selection.

Add the Enter Event with the wizard.

this.Panel_1.Enter += new System.EventHandler(this.Panels_Enter); //here after you added all with wizard, if they share all same code, just use the same method...for each Enter event. (change it also in the Destroy section !)

that’s it.

Hope it helps…