LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

control an object with mouse in display scene

Hello my friends.
Can I control an object with mouse in display scene? I want to input the position of a ball to a control loop with mouse.please help me.
0 Kudos
Message 1 of 4
(3,069 Views)
You can draw a ball in a picture control and then use mouse events to manipulate the redrawing of the ball to simulate dragging. Attached is a VI that updates the coordinates indicator when the mouse button is down inside the picture control. This is half the problem.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 2 of 4
(3,061 Views)
Hello mike,
Thank you for your help,
But I can,t take an output from it.
How can I take an output from while loop.
0 Kudos
Message 3 of 4
(3,021 Views)
You don't.

Your whole interface gets built into the event structure. For example, the case in the Mouse Move event that contains the coordinates indicator should incorporate the code to move your ball to the new location. The code for initializing the display goes outside the loop and gets executed before the loop starts. For other controls that your application requires, add event cases to handle them as needed.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 4
(3,012 Views)