|| 5 out of 5
How Can I Programmatically Prevent Resizing of the Front Panel?
LabVIEW Development Systems>>LabVIEW Full Development System
Primary Software Version:
Primary Software Fixed Version:
I want to be able to programmatically prevent users of my application from resizing the front panel of either my current VI or a SubVI. How can I implement this functionality?
Preventing resizing in a VI can be accomplished using property nodes, as shown in the VI snippet below:
- Add an Open VI Reference to the block diagram by right-clicking the block diagram and selecting Functions»Programming»Application Control»Open VI Reference.
- Add a Current VI's Path VI found in Functions»Programming»File I/O»Constants»Current VI's Path and connect it to the path input of the Open VI Reference VI.
- Right-click on the VI Reference terminal and select Create»Property Node for VI Class»Front Panel Window»Resizable.
- Right-click the FB.Resizable text and select Change to Write.
- Right-click the FB.Resizable terminal and select Create»Constant.
- Add a Close Reference to the block diagram by right-clicking the block diagram and selecting Functions»Programming»Application Control»Close Reference.
- Wire the VI as shown above.
If you plan to create an executable program based on this VI, you will need to replace the Open VI Reference with the VI Server Reference. This function simply references the application it is located in. This is necessary for executables since there is no VI to reference.
Related Links: Knowledgebase 3VEGHFQG: How Can I Resize the Front Panel of a VI Programmatically? Knowledgebase 209DQQ7Z: How Do I Create Attribute Nodes and Property Nodes?