Tabcontrol for pocket pc - .NET Compact Framework

  • Thread starter Thread starter Claudio Menezes
  • Start date Start date
C

Claudio Menezes

Hi all,

I am creating an application for Pocket Pc with VB.NET, and I need to
enable and disable the tabpages individually in the tabcontrol.

Anyone could help me? I need a lot to solve this problem.

Thks
 
Hi all,

I am creating an application for Pocket Pc with VB.NET, and I need to
enable and disable the tabpages individually in the tabcontrol.

Anyone could help me? I need a lot to solve this problem.

Lol, I asked this question this week too. Unfortunately it looks like it
can't be done. You have to remove the tabs from the tab control if you
don't want them displayed. Which is pretty easy, but putting them back in
again is a PITA because there is no 'InsertAt' method.

Richard.
 
Hi Claudio

AFAIk that is not possible, You can do one of several things:

1- Remove the page from the tab, you have to put it back and it may be a
problem :) ( see other post in the thread )
2- Intercept the PageChanged event and if the selected page is the one
disabled just select back the one that was before ( you may need to keep a
reference to the previously selected

3- You could create an image and place it above the tab page index, this
will hide the disabled page and still make the others accesible hence
creating the impression that it's "disabled"


I think that the third one is the best one, still it the one that may takes
more code :)

Cheers,
 
Removing the tab is the easiest to do. create an inherited tab page control
adding the appropiate property. Create an arraylist putting the tabpages
into it. catch the event on the tabpage and when the visible property
changes, remove all of the tabpages from tab control, walk through the
list setting the visible tabs parent to the tab control.

This should work for you.
Mark Dykun
 
Lol, I asked this question this week too. Unfortunately it looks like it
can't be done. You have to remove the tabs from the tab control if you
don't want them displayed. Which is pretty easy, but putting them back in
again is a PITA because there is no 'InsertAt' method.

Agreed.

FWIW, the full .NET Framework has this exact same "issue".
 
Back
Top