Example Code

Resize and Center a Front Panel Pane and Window on a Tab Control

Functional Description

This VI contains a tab control on its front panel. When run, it uses VI server property nodes to center the front panel pane on the tab control, resize the window to match the dimensions of the tab control, and center the front panel window on the screen. You can move the tab control anywhere on the block diagram, resize the tab control, and move the window anywhere. When run, the VI will resize and center itself again.

centerandresizeontab.PNG

Caveats and Additional Notes

This VI rely's on the tab control being the top-left-most object on the front panel.

Stephen B

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors