vnarod Posted August 23, 2002 Posted August 23, 2002 How to make TabPage in TabControl disabled/invisible? TabConltrol1.TabPages(0).Visible=False and TabConltrol1.TabPages(0).Enabled=False have no effect on tab "ears" Quote
*Gurus* Derek Stone Posted August 24, 2002 *Gurus* Posted August 24, 2002 I don't believe you can hide or show individual tabs, as they're not actual controls. What they are is an enumeration telling the framework how to render a tabbed dialog. So, with that said, you would need to remove the tab from the enumeration altogether to hide it, and add it back in to show it. Quote Posting Guidelines
vnarod Posted August 27, 2002 Author Posted August 27, 2002 But where I can store it while it is hidden? Or I have to recreate all controls on it every time I show it? Quote
*Gurus* Derek Stone Posted August 27, 2002 *Gurus* Posted August 27, 2002 You store it in a variable of type TabPage. Quote Posting Guidelines
vnarod Posted August 29, 2002 Author Posted August 29, 2002 Thank you. That makes sense. One problem, though. When I want to add it back I have to use TabControl1.Controls.Add (t) and it adds the page to the end. I don't see any property that will allow me to show the tab at a specific place. DO you know how to do it? Quote
*Gurus* Derek Stone Posted August 29, 2002 *Gurus* Posted August 29, 2002 Me.TabControl1.Controls.Clear() Me.TabControl1.Controls.AddRange(New System.Windows.Forms.Control() {Me.TabPage3, Me.TabPage2, Me.TabPage1}) I've yet to find a better solution. Quote Posting Guidelines
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.