Hiding TabPages at runtime

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I am using VC++ 2003 for a WinForm application

I have a TabControl with 5 pages. Depending on a user setting, I want to either show the first 2 or all 5 pages. How can I do this at runtime. I've tried the hide method on each page but I can still see the unwanted tabs with no controls, I've tried setting the visible method for each page but I can still see the unwanted tabs with disabled controls. I've tried Remove and Add for the TabControl itself but when I add the pages they are blank

Thank you
Joe
 
* =?Utf-8?B?Sm9lIFRob21wc29u?= said:
I am using VC++ 2003 for a WinForm application.
LOL

I have a TabControl with 5 pages. Depending on a user setting, I want
to either show the first 2 or all 5 pages. How can I do this at
runtime. I've tried the hide method on each page but I can still see
the unwanted tabs with no controls, I've tried setting the visible
method for each page but I can still see the unwanted tabs with disabled
controls. I've tried Remove and Add for the TabControl itself but when
I add the pages they are blank.

'Hide' and 'Enabled' methods don't work, you will have to remove/add the
tabpage.
 
Back
Top