Jump to content

different tab sizes in a tab control?


Recommended Posts

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

Link to comment

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

Link to comment

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

Link to comment

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

post-3370-1214921933.png?width=400

Link to comment

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).

Link to comment

QUOTE (LV_FPGA_SE @ Jul 1 2008, 08:20 AM)

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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.