Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding TabPages dynamically
Message
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
01133567
Message ID:
01133583
Views:
11
I wrote an article in the May 2004 edition of the UTMag on the TabControl.

In your case, I think I would create the complete interface as if the user has full rights and remove the TabPages that are not allowed to the user:
With TabControl1.TabPages
    .Clear()
    if (UserHasRightsOnTabPage1) Then .Add(TabPage1)
    if (UserHasRightsOnTabPage2) Then .Add(TabPage2)
    if (UserHasRightsOnTabPage3) Then .Add(TabPage3)
End With
>Hello All, I have a requirement to add / remove (not disable/enable !) tabpages in my app based on user rights (stored somewhere). I did something like this in VFP a while back, and , am wondering if this is a good way to go. The way I did it was , if the user had rights to the tabpage - add the page - the tab page then loaded it's controls in the ctor , which I could access with: thisform.tabpage.page1.control etc..., however , I have a feeling the object hierarchy in .NET is different than VFP, anyone ever done anything like this in .NET ?
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform