KatieT Posted July 2, 2008 Report Share Posted July 2, 2008 Hi, I just started using labview for about a month and have a quick question on tab control. I'm wondering if there's any way to make tabs in a tab control different sizes. That is, how do I make the active tab twice bigger than the inactive tab? I've been poking around for days but still couldn't figure this out. Thanks for helping! Catherine Quote Link to comment
mross Posted July 2, 2008 Report Share Posted July 2, 2008 QUOTE (KatieT @ Jul 1 2008, 12:31 AM) Hi, I just started using labview for about a month and have a quick question on tab control. I'm wondering if there's any way to make tabs in a tab control different sizes. That is, how do I make the active tab twice bigger than the inactive tab? I've been poking around for days but still couldn't figure this out. Thanks for helping!Catherine I don't know the answer to your question, but I bet if it can be done it is a fair amount of trouble customizing a tab control. You can play with fonts to expand the tab area. And you can nest a tab inside a tab. ( I don't know if that casues any trouble - nesting things for no really good reason sound like a bad idea intuitively) I have done this with no problems and you could certainly have different fonts in the outer and nested tabs. I will be interested to hear other answers. mike Quote Link to comment
Tim_S Posted July 2, 2008 Report Share Posted July 2, 2008 QUOTE (KatieT @ Jul 1 2008, 12:31 AM) Hi, I just started using labview for about a month and have a quick question on tab control. I'm wondering if there's any way to make tabs in a tab control different sizes. That is, how do I make the active tab twice bigger than the inactive tab? I've been poking around for days but still couldn't figure this out. Thanks for helping! If you're looking to make the tabs different sizes (rather than the contents of each tab), then you can right click on the tab area of the tab control to change properties. The area you're looking for is: Advanced->Tab Size. There are options under there as to how the tabs appear. Tim Quote Link to comment
LAVA 1.0 Content Posted July 2, 2008 Report Share Posted July 2, 2008 Using the property node for the Tab control you can programatically change the page captions to add and remove spaces for the active page. If the Tab Size is set to Fit to Contents then the size of the active tab will be bigger based on the extra spaces added. (I didn't use the OpenG Trim Whitespace VI, but I'm sure someone else will point you to them.) Download File:post-3370-1214921926.vi Quote Link to comment
Yair Posted July 2, 2008 Report Share Posted July 2, 2008 I'm not a big fan of this idea, because it causes annoying changes in the UI. Instead, what you might want to do is use some other way to make the current tab stand out. You can do this by enabling multiple colors on the tab control and then using the Pages[] property to color all other pages in another color. Another option is to create your own tab selector. This takes more work and is a bit annoying when modifying the tab, but it gives you more power and looks better. See a simple example attached (saved in 8.0). Quote Link to comment
KatieT Posted July 3, 2008 Author Report Share Posted July 3, 2008 QUOTE (LV_FPGA_SE @ Jul 1 2008, 08:20 AM) Using the property node for the Tab control you can programatically change the page captions to add and remove spaces for the active page. If the Tab Size is set to Fit to Contents then the size of the active tab will be bigger based on the extra spaces added. Cool! Since the whole string gets larger, the tab grows automatically even under "justify tabs" feature. That's really clever Thanks! Catherine QUOTE (Yair @ Jul 1 2008, 12:41 PM) Instead, what you might want to do is use some other way to make the current tab stand out. You can do this by enabling multiple colors on the tab control and then using the Pages[] property to color all other pages in another color. Thanks for the advice. However, my boss insisted on having the tabs the way I described. Catherine Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.