LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Why "EVENT_COMMIT" and "EVENT_LEFT_CLICK" sometimes missed

Dears, who could help me.....?

 

I used a command button, so I want to know what's the difference for "EVENT_COMMIT" and "EVENT_LEFT_CLICK" . I made the call back like below.

 

Question 1: Some times the "EVENT_COMMIT" works, some times the "EVENT_LEFT_CLICK" works. Why they cannot work at the same time?????

 

Question 2: If I removed the "case EVENT_COMMIT:" and its code, if I press to fast the  "EVENT_LEFT_CLICK"  also not work. Why???

 

 

int CVICALLBACK AddOne (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
switch (event)
{

case EVENT_COMMIT:
printf("EVENT_COMMIT - %d£¡\r\n",CountNub);
break;

case EVENT_LEFT_CLICK:
printf("EVENT_LEFT_CLICK------£¡\r\n");
break;


case EVENT_RIGHT_CLICK:
MessagePopup ("Tips", "AddOne_EVENT_RIGHT_CLICK£¡");
break;


case EVENT_LEFT_CLICK_UP:
printf("EVENT_LEFT_CLICK_UP!!£¡\r\n");
break;

}
return 0;
}

0 Kudos
Message 1 of 2
(4,820 Views)

Q1: what do you mean by that? Gan you give a detailed description on what you summarize with "event commit is not working"?

 

Q2: fast clicks on a button can produce a EVENT_LEFT_DOUBLE_CLICK event: how fast depends on system settings. The double click event is not handled by the system as two-clicks-in-series: it is different from the single click event.

 

 

The commit event is fired when the user commits **bleep** choice. On a command button, the commit event is generated when the user releases the mouse, provided the click started and ended on the button itself. That is, you can abort a button click if you click on the button, keep the mouse pressed, move the pointer away from the control and only then release the mouse.

 

You can fond some informations on events in the online helop, starting for example with this page, this one, this other one and in general the whole topic Library Reference >> User Interface Library >> Events in the CVI help. 



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(4,813 Views)