Hello,
I am glad that the event EVENT_MOUSE_WHEEL_SCROLL was added some time earlier to CVI. In principle, now it is possible to operate numeric controls, ring controls, etc. not only via keyboard and mouse, but also via the mouse wheel. This allows very smooth operations, great!
However, the integration level is inconsistent: While pressing the ARROW_UP key on a selected control will increase the value displayed in the control automatically, i.e. without the need of the programmer to react to a specific event, achieving the same result with the mouse wheel requires adding code to each callback. This is possible, but inconvenient as it adds a lot of overhead.
Right now, in every callback of a numeric or ring control that shall support the mouse wheel I have the following lines:
switch ( event )
{
case EVENT_MOUSE_WHEEL_SCROLL:
if ( eventData1 == MOUSE_WHEEL_SCROLL_UP )
{
FakeKeystroke ( VAL_UP_ARROW_VKEY );
}
else if ( eventData1 == MOUSE_WHEEL_SCROLL_DOWN )
{
FakeKeystroke ( VAL_DOWN_ARROW_VKEY );
}
break;
case EVENT_VAL_CHANGED:
...
Hence I suggest
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.