Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Resizing XControls

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

You can configure an XControl to respond to resizing by enabling front panel scaling in the Facade VI or handling the Panel Resize event in the Event structure in the Facade VI.

If you enable front panel scaling in the Facade VI, the controls that make up the appearance of the XControl automatically resize when the XControl resizes. Complete the following steps to enable scaling of the front panel in the Facade VI.

Note  If the Facade VI has multiple panes, you must complete these steps for each pane.
  1. Double-click the Facade ability in the XControl library to open and edit the Facade VI.
  2. Set all front panel objects to scale automatically when the front panel resizes.

Alternatively, you can handle the Panel Resize event in the Event structure in the Facade VI. When the XControl is resized, LabVIEW calls the Facade VI with a Panel Resize event. In response to the event, you can move and resize each control individually that makes up the appearance of the XControl. Using the Panel Resize event is useful because you have more flexibility when you resize; however, it requires more coding.

Complete the following steps to configure the Event structure in the Facade VI to handle the Panel Resize event.

  1. Double-click the Facade ability in the XControl library to open and edit the Facade VI.
  2. Right-click the Event structure on the block diagram and select Add Event Case from the shortcut menu to display the Edit Events dialog box.
  3. In the dialog box, select <This VI> from the Event Sources list.
  4. Select Panel Resize from the Events list.
  5. Click the OK button to save the configuration and close the dialog box.
Note  If the XControl must have a fixed size, disable resizing on the front panel of the Facade VI. Remove the checkmark from the Allow user to resize window checkbox in the Customize Window Appearance dialog box to disable resizing.

If the XControl must have a minimum size, specify the minimum size for the Facade VI. Enter width and height values for the Minimum Panel Size option of the Window Size page of the VI Properties dialog box.


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit