Here's yet another use for the tab control:  Rather than using it as a tab control 
with tabs, I make the tabs invisible and just use it to control front panel 
visibilities using the Run-Time Menu.  I set up the tabs with common names first(ie 
Main, Test 1, Test 2, Test N, configuration, Comments), then make all tabs invisible 
so that the tab control looks like a raised box decoration.  This way I can make as 
many desired tabs without it taking real estate from the front panel.  I then create a 
menu item named "VIEW" and within that menu I list each name of the tabs (Main, Test 
1, Test 2, Test N, etc.) as they are labeled on the tab control.  I then use the Menu 
Selection Event to output the item tag string directly to a case that contains the 
'value' property node of the tab control with the enum constant matching the case name 
(Main, Test 1, etc.).  This way, I can click on the VIEW menu and select the desired 
view to make a certain tab page visible.  Prior to the tab control included in LabVIEW 
6i (If I remember correctly), the code required for this functionality was not so 
clean and simple.  Hope you like it.  

Guy Holland
Intralase Corp.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 14, 2004 3:23 AM
To: [EMAIL PROTECTED]
Subject: Another use for tab indicators


For the multitude (2) of you who liked my earlier suggestion for using the tab control 
instead of stacking
invisible controls here's something else I nearly always do.

When I begin to code a new application the first thing I do is put a tab control with 
3 tabs on the panel,
change it to an indicator, and turn off auto-grow (auto-grow has bit me more times  
than I want to think about.).

I label the tabs "visible", "hidden", and "configuration" and size the control 
slightly larger than the viewed panel will be.

Next I drag a bitmap background (favorite is a graduated blue background light in the 
center and darker at the edges
that I made in PowerPoint) onto the "visible" tab, size it to fill the whole viewed 
area and place all the controls and indicators 
that the user sees on top of it changing font colors etc to look good with the 
background. Users really notice an attractive
panel. Its worth a bit of extra effort to create a professional appearance. 

On the block diagram I set the tab to "viewed" when the vi starts.

I put all the controls and indicators that nobody sees but me (the developer) on the 
hidden tab.

Most of my Apps allow for some configuration stuff that I save to .ini files (Read 
Key.vi, Write Key.vi). I put
all the controls related to those items on the "configuration" tab and simply switch 
tabs in my program back and
forth between "visible" and "configuration" as needed.


Finally I adjust the scrollbar on the panel so that the tabs are just off the top of 
the viewed area  and save the vi. 
The built application has the scrollbars turned off so the user will never see the 
tabs yet when I work with the 
code in the development environment its easy to get at everything. 


Roy Kniskern, Sr. Product Dev. Engineer

MOOG Components Group Inc.
1213 N. Main St.
Blacksburg, VA 24060
<http://www.polysci.com/>
(Formerly Northrop Grumman Poly-Scientific)
mailto:[EMAIL PROTECTED]





Reply via email to