02-10-2006 07:57 AM
02-10-2006 08:13 AM
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
02-10-2006 08:32 AM
Yes if you are trying to move a button with drag and drop during execution, it is not trivial. You will have to register and unregister events dynamically. If you want to create new buttons in run time then you are out of luck (outside of scripting). But I have done this where you can move existing controls during execution.
Paul
02-10-2006 08:36 AM
02-10-2006 08:39 AM
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
02-10-2006 08:41 AM
Sorry I didnt finish explaining: on "mouse down?" for a particular button register for the "mouse move" event, in the mouse move event you update the controls position with the coordinates of the mouse and on the "mouse up" event unregister for the mouse move event. This enables a button to follow the mouse move event but only if it is between a buttons mouse down and mouse up event. Even nicer you can bound the mouse down event to unly work if you double click or have some platMods or other mods selected, which gives you even finer control over the operation of the events.
Paul
02-10-2006 08:42 AM
LabVIEW, C'est LabVIEW
02-13-2006 01:42 AM
Thanks a lot for all of you! That example really shows how to do it. Not so simple way but I think good enough.
Regards,
Matias
02-13-2006 09:53 AM
FYI, I have used a very similar code with picture boxes to simulate some laso/ highlight region tools. This model of a dynamic event registration where you can isolate mouse move events between clicks allows for very powerful control over an application's GUI.
Paul