Change the Tab Display order in a TabBarSplitterControl programmatically.

Hi,

How can I change the tab display order in a TabBarSplitterControl programmatically?

I know at runtime if you drag and drop a page over the other it will change but how can I achieve this in code?

To be more precise say I want to Add Tab Pages “A”, “B” & “C” to the TabBarSplitterControl and it will be displayed in the order we add like “A” then “B” and then “C”.

But when ever I add a new Tab Page “D” it should be the first one to be displayed in the list of tab pages. I.e. the display order should be “D”,”A”,”B”,”C”.

And when I add Tab page “E” , it works as normal ,i.e. the display order will remain to be “D”,”A”,”B”,”C”,”E”.

Please let me know how this can be achieved in code dynamically?

Regards,
Sreekesh NK



1 Reply

AD Administrator Syncfusion Team July 28, 2008 12:52 PM UTC

Hi Sreekesh,

Thank you for interest in Syncfusion Products.

You can use the tabBarSplitterControl1.TabBarPages.Insert()method to insert the tabpages in specified position/index in a tabBarSplittercontrol.
Here is a code snippet that shows you “How to insert the tabpage in a tabbarSplitter control”.

[C#]

tabBarSplitterControl1.TabBarPages.Insert(int index, tabpage value);

Example:
tabBarSplitterControl1.TabBarPages.Insert(0,tab4);

I have attached the sample for your reference. You can download the sample from the following page.
http://websamples.syncfusion.com/samples/Tools.Windows/F75451/main.htm

Please let me know if you have any queries.

Regards,
Hema



Loader.
Up arrow icon