enable tabcontrol

  • Thread starter Thread starter Phil
  • Start date Start date
P

Phil

on my form I have a checkbox and a tab control when the checkbox is true I
wish to enable the controls on a single page of the tab control, is this
possible or do I need to enable each control on the tab control page.
if you could supply and example of code it would be much appreciated
thanks phil
 
Phil,

You can set a panel on your tabpage.
Dock that fill

Place your controls on that

And than enable disable the panel.

I hope this helps?

Cor
 
Phil said:
on my form I have a checkbox and a tab control when the checkbox is true I
wish to enable the controls on a single page of the tab control, is this
possible or do I need to enable each control on the tab control page.
if you could supply and example of code it would be much appreciated
thanks phil


Simply set the tabpage's 'Enabled' property to 'False'. This property is
not accessible at designtime, you you will have to set it at runtime.
 
on my form I have a checkbox and a tab control when the checkbox is true I
wish to enable the controls on a single page of the tab control, is this
possible or do I need to enable each control on the tab control page.
if you could supply and example of code it would be much appreciated
thanks Phil
 
Phil said:
on my form I have a checkbox and a tab control when the checkbox is true I
wish to enable the controls on a single page of the tab control, is this
possible or do I need to enable each control on the tab control page.

You don't need to disable each control individually. Disabling the tabpage
will disable all controls contained in the tabpage too.

\\\
Private Sub CheckBox1_CheckedChanged( _
ByVal sender As Object, _
ByVal e As EventArgs _
) Handles CheckBox1.CheckedChanged
Me.TabPage2.Enabled = Me.CheckBox1.Checked
End Sub
///
 
when setting the enable to false for the tab control is this done in the
form code or the tab control code
thanks phil
 
figured out the code
Me.tabSurveyorCertificate.Enabled = False
but when typing tabSurveyorCertificate. intellsence dosnt provide enable as
a option is there a reason for this
thanks phil

"Phil" <phespe remove this bigpond.net.au> wrote in message
TNGP10.phx.gbl...
when setting the enable to false for the tab control is this done in the
form code or the tab control code
thanks phil
 
Phil said:
Me.tabSurveyorCertificate.Enabled = False
but when typing tabSurveyorCertificate. intellsence dosnt provide enable
as a option is there a reason for this

Maybe they decided to hide the property because the tabpage's header text is
not drawn in disabled style.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top