Click here to Skip to main content
15,747,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi !

I try to make a custom TabControl from scratch (not inherited from the real one), And I try to add the same design-time features as the real one.
-Add controls to tabs containers by drag and drop
-Make the childs TabPages visible in the VisualStudio Document Structure window.

I know I must create a custom Designer class and I have one. It is inherited from ParentControlDesigner

My TabPages are inherited from UserControl (it's not a ContainerControl ??). I have added this attribute to my CustomTabPage control
<Designer(GetType(ParentControlDesigner))>


Nothing works. I tried to make my CustomTabPage control inheriting from Panel but doesn't work.
If I try to override the "OnControlAdded" method a change the parent of added control by my TabPage, when I drag a control over a TabPage, the control come back on the Form. If I don't override this method, the control is added, but directly in the TabControl ... not in the selected tabPage.

Can somebody help me to understand ? or is there an example of how to create the same kind of controls ? Thanks in advance and sorry for my bad english
Posted

1 solution

kindly check this link to help you how to create custome control class,
http://www.codeproject.com/KB/tabs/GradientTabControlPackage.aspx[^]
regards...
 
Share this answer
 

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