Why can't we disable a tab page?

  • Thread starter Thread starter Cat
  • Start date Start date
C

Cat

Most of the basic UI controls have Enabled property. I know we can't
disable a specific tab page, but why is it so? What is the rationale?
I don't think Microsoft developers designed that way because they
couldn't implement it.
 
Cat said:
Most of the basic UI controls have Enabled property. I know we can't
disable a specific tab page, but why is it so? What is the
rationale? I don't think Microsoft developers designed that way
because they couldn't implement it.

Have a look at the appropriate m.p.d.framework.* group. This one's for
VB.Net language related problems.


Armin
 
Cat.

You can simple remove it temporaly from the TabPageControl.Controls

\\\
YourTabpageControl.Controls.Remove(TheTab)
///

What you think wabout the implementation of the Microsoft developers.
Everybody is free to do it himself if he can do it better.

Cor
 
You can still set a page to Enabled = False. Then in the selecting you
have to set e.Cancel to true to cancel it, e.g:
e.Cancel = Not e.TabPage.Enabled
But the real issue is you need to set it to ownerdrawn and draw the tab
captions in the DrawItem events.
 
Hi
In the load event of the corresponding form set the drawmode property of
the tab control, it will allow you to disable any tab page
Tabcontrol.DrawMode = TabDrawMode.OwnerDrawFixed
 
Back
Top