Community Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically Move/Hide, Rename Captions, and Size To Text Controls in Cluster

  The Moveable Cluster Controls VI enables you to use a right click context menu to hide or move the controls in a cluster during run-time. This functionality is useful if your application ships to multiple customers each of whom want custom configurations and captions of the fields in a large cluster.  Run the included VI to see how you can implement this functionality in your applications.

  This VI was inspired by several other examples on this site that deal with programmatically moving FP controls and uses dynamic shortcut menu creation, as well as event handling.

Move

Right Click each control and select "Move".  This triggers an event that moves the control wherever your mouse moves within the cluster.  You can't drag the control outside of the cluster.

Hide

Right Click each control and select "Hide"This triggers an event that changes the visibility of the control. 

Reset To Default

Clicking this button uses the position properties of a second hidden control to reset the positions of the controls that have been moved during execution.  It also causes the visibility to go back to visible for all hidden controls.

Rename Captions

The rename captions button loops over each control and replaces the "Caption.text" property with "Value" entered by the user.  Good for multilingual apps.

Size To Text

  This button resizes the vertical height of the String controls based on the text entered.  All of the fields in the cluster default to single line.  If you want to see a 3 line address field, just type in the address as you want it to appear, and hit the button.  The vertical height is adjusted using the "Size to Text" property.

Contributors