Click here to Skip to main content
16,017,852 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi guys hoping that someone can help me.

I have a form with a TabControl on. I have to make an instance for tabpage with a class each time a user selects on a option via treelist. The instance will have the same controls on but will display different info for each control.

Can anyone please help me!
Posted
Updated 9-Jun-11 4:09am
v2
Comments
OriginalGriff 9-Jun-11 10:20am    
So what is the problem?
Are you waiting for permission, or is there some part of this you don't understand?

1 solution

Just create a wrapper for the TabPage that takes an instance of your class as a parameter in the constructor. Then when the user uses the button, you just create an instance of your new TabPage control, instead of the default one, passing it the selected item. Then you can do what you like with the class's data - show it text box, display in grid etc.

Hope this helps
 
Share this answer
 
Comments
Gigantour 9-Jun-11 10:42am    
Do you maybe know of an example? I am new to C# and struggling like hell.

Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900