LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

EVENT_MOUSE_WHEEL_SCROLL not triggering

Solved!
Go to solution
I'm trying to enable mouse scrolling on a table control. Simple right? And I could swear I've done it before, but it's not working right now.
int CVICALLBACK TableCallback(int panel, int control, int event, void *callbackData, int eventData1, int eventData2)
{
	switch (event)
	{
		case EVENT_MOUSE_WHEEL_SCROLL:
			DebugPrintf("scroll wheel triggered! type = %i, amount = %i\n", eventData1, eventData2);
			break;
			
		case EVENT_MOUSE_POINTER_MOVE:
			DebugPrintf("mouse moved! %i, %i\n", eventData1, eventData2);			
			break;
	}
	return 0;
}
The above gets triggers for mouse pointer. I also get triggers for LEFT and RIGHT clicks. But nothing on scrolling. Also tried two different mice. Is this computer related?
0 Kudos
Message 1 of 4
(3,621 Views)
Solution
Accepted by topic author ElectroLund

Nevermind, I figured it out.  My table control was set to Indicator mode.  For scroll wheel events, mode must be Hot.

0 Kudos
Message 2 of 4
(3,614 Views)

...which is not an optimal situation!

What if I want to display a large set of data in a table with scrolling enabled? I need to set each cell to indicator mode and leave the table in hot mode, which enables selecting cells/rows/columns and using F2 or double-click to go to edit mode (which is useless since cells are in indicator mode but prevents further scrolling until another cell is selected or Esc is pressed or...) Smiley Surprised

IMHO table scrollng should be active regardless the control mode.



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?
Message 3 of 4
(3,577 Views)

I completely agree.  In my case, I'm using a table as a glorified indicator message box, so that I can do row color highlighting.  But it's very inelegant this way.

 

You could also set the table control property ATTR_NO_EDIT_TEXT to true to further prevent editing.

0 Kudos
Message 4 of 4
(3,512 Views)