LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

panel

hi
actually i want the user to a click option when i display my panel...
wat the problem is ??
panel is displayed in a loop condition ..so it dsiplays panel and run the loop...
i want it get break and wait for user to select option and then only it should run the loop stmts..
tell me the best to do this...
ex::
 
while()
{
displaypanel();
/// i want it to get break here and wait till user chooses an option...
.....
....
}
0 Kudos
Message 1 of 2
(3,007 Views)

Hello sks,

I think the easiest way is using the function GetUserEvent. From this function you can get the handle of the panel and the control that the user clicked.

   do{
         GetUserEvent (1, &pnl, &ctrl);
   } while (!(pnl == panel && (ctrl == PNL_OPTION1 || panel == PNL_OPTION2)));
   
   if (ctrl == PNL_OPTION1){
    ...
   }
   else if (ctrl == PNL_OPTION2){
    ...
   }

0 Kudos
Message 2 of 2
(3,002 Views)