Click here to Skip to main content
15,914,500 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want to create a pane inside a tabcontrol . Inside a pane it should have some controls . There will be a button "next" when i click on it , it should show another pane in same tab which should have some other controls . Is it possible to do this in c#?? If so some ideas will be helpful . Looked at navigation pane but it is required for me .

This is the form without adding pane . I should add pane inside tab1 in which pane should move when i click on NEXT button .

http://s282.photobucket.com/albums/kk269/dxm4i/?action=view¤t=form.jpg[^]
Posted

1 solution

Yes - just put your Panels inside the appropriate TabPage. Moving them is easy: just change the Location property (probably in a timer if you are trying to slide-out, slide-in on the Next button)

What part of this is giving you a problem? Or do we have communications problems?


"We should not change the tab it should remain in tab1 but when i click on next button another pane should appear . Is it possible on panel ??"

Yes. Create two panels (call then panelFirst and PanelSecond, say). Fill them with the appropriate controls - do not drag you panels on top of each other in the designer, that will put the dragged panel inside the dragged-onto panel. Use the size handles instead, and it may be worth "stacking" the panels to make them easier to work with - you can re-locate them at run time if you need to. Set the Visible property of panelFirst to true and panelSecond to false.

In the Next button Click handler, set panelFirst.Visible to false, locate panelSecond so it is at the same Point as panelFirst, and set it's Visible to true

There you go - one panel and all it's controls are replace with another, on the same tab page.
 
Share this answer
 
v2
Comments
steven8Gerrard 6-Aug-11 3:57am    
We should not change the tab it should remain in tab1 but when i click on next button another pane should appear . Is it possible on panel ??
OriginalGriff 6-Aug-11 4:07am    
Answer updated

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