Display the same smartpart on Different Tabs

Topics: CAB & Smart Client Software Factory
Jan 27, 2006 at 8:10 PM
originally posted by: amishah_2001

Hi!
I am displaying the smart part on the first tab page like:
MainAssociateWIView mainAssociateWI;
mainAssociateWI = this.Items.AddNew<MainAssociateWIView>("MainAssociateWI");
ISmartPartInfo info = new TabSmartPartInfo();
info.Title = "Tab1";
RegisterSmartPartInfo(mainAssociateWI, info);
contentWorkspace.Show(mainAssociateWI);
Now I want to display the same smart part on the second tab page, how should i go about?
I have written the following code for that but it is not working:
ISmartPartInfo info = new TabSmartPartInfo();
info.Title = "Tab2";
RegisterSmartPartInfo(mainAssociateWI, info);
contentWorkspace.Show(mainAssociateWI);

Please suggest me solution. thanks in advance.
Jan 28, 2006 at 12:18 AM
originally posted by: amishah_2001

I implemented it with the following but any other better way,
TabPage tp = new TabPage("SomeName");
tabworkspace.TabPages.Add(tp);
view.Parent = tp;
tabworkspace.Show(view);