Thursday, February 2, 2012

LabVIEW Scalable Tabs to Control Separate Test Applications on the Same Interface

I was working on a new project this week and wanted to have a smart way to switch between the different tasks the application had to perform without having a side bar, or HMI style buttons. So here's what I came up with:

The buttons across the top are from a system tab control which is behind a single sub-panel container. When the user clicks on another tab, the application automatically switches between tasks by unloading and loading the tasks in the sub-panel.

Another feature I wanted was for the tabs to be justified across the user interface and for all the controls on the screen to be able to size with the window. The scaling of the controls is not very fluid, but when the user re-sizes the window, all the controls on the main screen scale. I will probably have to scale the sub-panel task controls as well, but that can be a function of the sub-panel task and the main application does not have to worry about what is going on in the sub-panel.
I can never remember how to set the position of the panel/pane, so I figured this was a good place to keep track of that as well. The block diagram above shows the reaction to scaling the window by the vi as well as the loading of the initial sub vi. I have seen various examples of sub-panels, but none with tabs like this.

A write-up with example code is here.

No comments:

Post a Comment