07-02-2009 04:45 AM
Hi,
does anybody know which is the maximum number of tabs that a tab control can have?
Thank you very much!
Solved! Go to Solution.
07-02-2009 04:47 AM
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
07-02-2009 04:54 AM
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!
07-02-2009 04:54 AM
07-02-2009 05:00 AM
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. RegardsSam
07-02-2009 05:24 AM
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
Regards
Alain
07-02-2009 07:46 AM
Here is an example that loads a 'fortune' style text file and randomly selects one of the elements. (LV 8.6)
07-02-2009 08:08 AM
But a tab control with many many many tabs, no I don't think this is the way to go
Fully agree ! This is really not the way to go !
07-06-2009 07:53 AM
07-07-2009 08:34 AM
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.