Hi Doug,
When a control callback is activated, it is initally called before the panel callback (at least in my experience). However, the panel left click event is called before the button commit event. Knowing this we can play the events off of each other. What you can do would be to create a global flag variable and use it to determine if the user clicked the help button or the panel. Since the help button callback is called first, you can set the flag to false which would tell the panel callback not to perform any actions. After the EVENT_COMMIt is performed on the button you can reset the flag back to true again in order to free the panel to move on. For example:
//Set your global flag
int moveToNextScreen = TRUE;
//The button callback
int CVICALLBACK ButtonCallback(int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
//Set our flag to false before any event takes place, to ensure it gets through before the panel event
moveToNextScreen = FALSE;
switch (event)
{
case EVENT_COMMIT:
/*Load your help file*/
moveToNextScreen = TRUE;
break;
}
}
//Panel callback
int CVICALLBACK PanelCallback(int panel, int event, void *callbackData,
int eventData1, int eventData2)
{
switch (event)
{
case EVENT_LEFT_CLICK:
if ( moveToNextScreen == TRUE)
{
/*Move to your next panel*/;
}
break;
}
return 0;
}
Hope this helps!