09-01-2016 09:38 AM
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?
Solved! Go to Solution.
09-01-2016 12:17 PM
Nevermind, I figured it out. My table control was set to Indicator mode. For scroll wheel events, mode must be Hot.
09-02-2016 04:46 AM
...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...)
IMHO table scrollng should be active regardless the control mode.
09-06-2016 07:42 AM
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.