![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
Join Date: Feb 2006
Posts: 155
Rep Power: 3
![]() |
tab control...
in c#, how do you determine the number of tabpages at runtime?
I mean the coder does not know beforehand how many tabs the user will need, so how does the coder handle the variable number of tab pages? also, the number of tab pages should not effect the size of the form, which implies that great number of tab pages would imply lesser (but equal) area given to each tab page. if you think i shouldnt be using tab control, then feel free to suggest alternatives too.... i just need some sort of tab functionality |
|
|
|
|
|
#2 |
|
Professional Programmer
Join Date: Oct 2005
Location: Chitown
Posts: 422
Rep Power: 4
![]() |
I haven't really used the tab control, but why not keep a variable and add one to it every time a new tab is created.
|
|
|
|
|
|
#3 |
|
Hobbyist Programmer
|
TabControl.TabPages.Count Doesnt that work? Also, when you add or remove tab-pages the size of the control does not change but rather the tab's either spread out or overrun.
__________________
Mona Lisa must of had the highway blues you can tell by the way she smiles.. |
|
|
|
|
|
#4 | |
|
Hobbyist Programmer
Join Date: Feb 2006
Posts: 155
Rep Power: 3
![]() |
Quote:
|
|
|
|
|
|
|
#5 |
|
SEXY SHOELESS GOD OF WAR!
![]() Join Date: Jun 2005
Location: Wet west coast of Canada
Posts: 1,198
Rep Power: 5
![]() |
Try something like this, where tc is your TabControl instance, and tp is a TabPage:
tc.Controls.Add(tp); tc.Controls.Remove(tp);
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot. - Vaarsuvius, Order of the Stick |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Editing the look of a tab control | crawforddavid2006 | C# | 4 | Jun 18th, 2007 9:06 PM |
| How to add inherited control to toolbox. | InfoGeek | C# | 3 | Feb 8th, 2007 10:12 PM |
| questions on windows sendMessage and RichEdit control | nomer | C++ | 1 | Mar 3rd, 2006 3:51 AM |
| C programing control of the Serial Port. | Light | C++ | 5 | Feb 24th, 2005 3:14 PM |
| Show web user control hidden | see07 | C# | 1 | Feb 2nd, 2005 11:35 AM |