Guest bytesighs Posted September 25, 2002 Posted September 25, 2002 I have a simple tab control created at design time. I want one of the tab pages to be disabled or not visible when the application runs the becom visib;e/ enabled after a button is clicked. It doesn't seem to work. Am I doing something wrong or is this a bug? Page load event.... tabpage6.visible=false the visible.false doesn't seem to do anything Quote
Guest iowahawk43 Posted September 25, 2002 Posted September 25, 2002 Tabs are typically arrays, not individually named as your sample code shows. Tab(6).Visible = False Remember that arrays start numbering with 0. Quote
*Gurus* divil Posted September 25, 2002 *Gurus* Posted September 25, 2002 The way he was using would work, if you could actually do this. Tab strips are not meant to have their tabs hidden or disabled on the fly, nowhere in Windows does this. You need to re-evaluate your problem and come up with a better UI solution. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Guest bytesighs Posted September 25, 2002 Posted September 25, 2002 Thanks guys, guess I'll adopt another solution Quote
Salat Posted April 8, 2003 Posted April 8, 2003 If somebody ever got the same problem: I've solve it in this way... TabControl1.TabPages.Remove(TabPage1) ' if You want this TabPage and it's button to be invisible TabControl1.TabPages.Add(TabPage1) 'othervie use this It's a bit complicated... look out for those tabs which are already added, and do not remove those which are removed Quote profesjonalne programowanie na zlecenie :)
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.