Raise OnStartEvent for custom button

Raise OnStartEvent for custom button

hoeckesfeld
Enthusiast Enthusiast
341 Views
1 Reply
Message 1 of 2

Raise OnStartEvent for custom button

hoeckesfeld
Enthusiast
Enthusiast

Hey all,

 

The OnStartCommand event is raised whenever I click on a normal button in a tab/panel. 

 

When I add my custom button with my own custom code (command) behind it, it doesn't raise the event. Is there a way to raise the event myself? 

 

I believe would also need a custom CommandIDEnum to raise the event. How would I define my own, if at all possible? 

 

My goal is to abort the code behind my button (my custom command) once a different command has been started.

 

Thank you!

0 Likes
342 Views
1 Reply
Reply (1)
Message 2 of 2

Ralf_Krieg
Advisor
Advisor

Hello

 

The button definition object provides an OnExecute event. Add a handler and check if there's an active command to cancel/don't start your own? I#m not sure if this event is raised before OnActivateCommand.


R. Krieg
RKW Solutions
www.rkw-solutions.com
0 Likes