To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This VI allows the user to move controls and indicators on the front panel while the VI is running
Description
This VI uses events to monitor the mouse movements and property nodes to move the front panel objects to follow. The main Example.vi has a waveform chart, Boolean indicator, and a stop control. The block diagram uses two property nodes to create a reference for the front panel objects. It then uses three SubVI’s.
The “Drag & Drop New Multi.vi” VI takes in the references and registers events for the mouse moves. The for loop will accommodate multiple references. The reference is then sent to “Drag & Drop Run Multi.vi” where an event structure with the dynamic event registration feature responds to the mouse movements. A while loop in the main VI repeats this SubVI until the Stop button on the front panel is pressed. Then the “Drag & Drop End Multi.vi” unregisters the events. To implement these VIs, create a reference to the object and make it an input to the Example.vi within the Zip folder. To use it with multiple objects, build an array of references.
Requirements
LabVIEW Full Development System 2012 or compatible
Steps to Implement or Execute Code
To Execute:
To implement in your code:
To implement as a SubVI:
Additional Information or References
VI Block Diagram
**This document has been updated to meet the current required format for the NI Code Exchange. **
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Nice! 😊
Is it possible to add some sort of "snap to grid" function to this? 🤔
(Or alternatively so that the objects (controls/indicators/etc) cannot be placed on top of each other?)
Do you know if it is possible to move a control/indicator into a presently selected page in a tab control? I tried placing a tab control on the example but it didn't seem to work