LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

maximum number of tabs in a tab control

Solved!
Go to solution

Hi,

 

does anybody know which is the maximum number of tabs that a tab control can have?

Thank you very much!

0 Kudos
Message 1 of 10
(3,435 Views)

Hi Fruss,

can you explain why you need it? A tab control is an enum, so you can't change the number of tabs at runtime.

 

Mike

0 Kudos
Message 2 of 10
(3,431 Views)

Hi!

 

I don't need to add tabs at runtime, but I've implemented a "Tip of the day" window in my program, and I use a tab control with hidden tabs in order to show the different tips.

Right now I don't have many tips but they will increase in the future and I want to be sure that my implementation will be valid if we have 300 tips for example.

 

Thanks!

0 Kudos
Message 3 of 10
(3,425 Views)
The datatype of this enum is U32. Therefore you will run in a display problem (let's imagine a tab control with thousands of tabs) long before reaching the maximum number (2^32) of tabs !
Message 4 of 10
(3,424 Views)

Hi

 

The tabcontrol is an enum control with representation of U32.  So theoritacally you can add 2^32. But this cannot be added dynamically in the runtime. You have to predefine number of tabs but you can hide pages using property node.
 
Regards
Sam
0 Kudos
Message 5 of 10
(3,422 Views)

Hi Fruss,

 

Do you think this is the right way to do this?

Why not writing your tips in the registry together with a counter that increments each time you open or close the application?

Using an INI file is another way of storing your tips.

You can also encode your tips if you don't want the user to read all your tips at once from the ini file.

Also using a ".BIN" extension is maybe enough to discourage some people of opening the file.

 

But a tab control with many many many tabs, no I don't think this is the way to go Smiley Sad

 

Regards

Alain

Message 6 of 10
(3,417 Views)

Here is an example that loads a 'fortune' style text file and randomly selects one of the elements. (LV 8.6) 

 

lv_fortune.png

 

 

 

 

 


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

0 Kudos
Message 7 of 10
(3,381 Views)

 But a tab control with many many many tabs, no I don't think this is the way to go Smiley Sad


 

Fully agree ! This is really not the way to go !

0 Kudos
Message 8 of 10
(3,370 Views)
I agree with the previous posters - a huge tab structure is difficult to maintain.  There is almost always a better way.  Case in point, while designing a plug-in architecture, we looked at creating dynamic numbers of tabs for the various plug-ins we were going to be creating.  This is straightforward, but tedious, if you use scripting (Create VI, create tab, set number of tabs, put subpanel on each tab, re-target subpanels from old tab set to new tab set, swap VI with new tabs from master subpanel).  It worked, but it was far easier and much more intuitive to the user to simply have one subpanel and one plug-in available at all times with a tree control showing the plug-in hierarchy.
This account is no longer active. Contact ShadesOfGray for current posts and information.
0 Kudos
Message 9 of 10
(3,318 Views)
Solution
Accepted by topic author Fruss

Thank you to all of you.

I'll finally use a XML file to store the tips, and a boolean value in the registry to save the Show Tips at Startup.

 

0 Kudos
Message 10 of 10
(3,294 Views)