LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I detect that a moveable control is moved?

Hello,
 
I am using the movectrl.pf function panel, located in CVI80\toolslib\custctrl to make a control moveable by dragging it while holding the Ctrl-key. How can I detect when the user moves this control? Appearantly the control's callback function is not called when the control is moved Smiley Sad
0 Kudos
Message 1 of 3
(3,229 Views)

Wim, the behaviour of almost all custom controls in the programmer's toolbox is to chain a new callback to the customized control and the movable control instrument makes no difference. The chained callback is executed BEFORE standard control callback so that it intercepts control events and can decide wether to pass those events to the original control callback or not: in case of this instrument, the Ctrl+Left click event is swallowed by the chained callback so that it is not passed over to the original control callback.

I'm afraid you have no way of intercepting this event other that modifying the instrument (which is distributed together with its source so it can be modified according to your needs: the callback chained to the control is DynamicCtrlCallback located in <cvidir>\toolslib\custctrl\movectrl.c.

I wrote those lines looking at CVI 7.1 instrument: I have not installed cvi8 on my machine yet; anyway you can check to see if the instrument structure has changed in the last version of CVI.



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 2 of 3
(3,218 Views)
OK, that will solve my problem.
 
Thanks a lot Roberto!
 
BTW: movectrl.c hasn't changed in CVI8.0
0 Kudos
Message 3 of 3
(3,211 Views)