Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
I have inherited a application which creates a ProUIDialog. One of the pushbuttons activates a loop to allow the user to select items from a 3D display list.
The code for the mouse pick is:
while(1) {
status = ProMousePickGet (PRO_ANY_BUTTON, &button, screen_pt); | |
if ( button == PRO_MIDDLE_BUTTON || status != PRO_TK_NO_ERROR ) break; ... } |
Picking the middle mouse button exits the loop and makes the dialog active again. Is there any way to set the dialog cancel button (red X) to be enabled? I set ProUIDialogCloseActionSet() but when in the loop, picking the cancel button just rings a bell.
Any ideas?
Thanks,
Bob
Hi all,
Bob,
Without knowing how the loop is constructed it is a shot in a dark...
I would either insert a dialog close statement in a button check block:
if( button == PRO_MIDDLE_BUTTON ... ) {
ProUIDIalogUnload(); // check spelling
break;
}
or use a static module level variable which would be set depending on button pressed and an observer within a dialog code to react on a variable value.
HIH.
Feliks.