disabling (greying out) tabs on a form

  • Thread starter Thread starter slippy
  • Start date Start date
S

slippy

I have a form with numerous tabs on it but when the user chooses a
specific option I want all but one tab to be disabled (greyed out but
still visible). Can anyone tell my how I may do this?

Thanks
 
slippy said:
I have a form with numerous tabs on it but when the user chooses a
specific option I want all but one tab to be disabled (greyed out but
still visible).

Set the tabcontrol's 'Enabled' property to 'False'. This will prevent the
user from changing the selected tab and any of the controls contained in the
tabpages. Notice that this will not visually "gray out" the tab headers.
To do this, you will have to change the tabcontrol's 'DrawMode' property to
'OwnerDrawFixed' and draw the caption according to the enabled state using
'ControlPaint.DrawStringDisabled'.
 
Can you show me any examples of how this can be done?

Sorry, I'm a newbie to vb.net programming and I'm not too familiar
with the language as of yet....

Thanks

Slip
 
Back
Top