how to close tabpages with views in tab workspace

Nov 4, 2008 at 11:59 AM
hi all,
i am trying to display view1,view2 in tabworkspace.I wrote the folowing code int the Module controller.cs in the ADD views method()

 

TabSmartPartInfo info = new TabSmartPartInfo();

 

info.Position =

TabPosition.Beginning;

 

info.Title =

"Empid";

 

info.Description =

"Gives The Employeeid from table";

 

 

 

LeftView lv = WorkItem.SmartParts.AddNew<LeftView>();

 

WorkItem.Workspaces[

WorkspaceNames.tabWorkspace1].Show(lv, info);

 

 

TabSmartPartInfo info1 = new TabSmartPartInfo();

 

info1.Position =

TabPosition.End;

 

info1.Description =

"Provides the details of the ID";

 

info1.Title =

"Employee Details";

 

 

RightView rv = WorkItem.SmartParts.AddNew<RightView>();

 

WorkItem.Workspaces[

WorkspaceNames.tabWorkspace1].Show(rv, info1);

Now my problem is i want to close each tab indiviually.with a "X" button on each tab page.

how could i get the "X" button on the tabpage.and close each view in the tabpage.

please help me .thanks in advence...