No time for a proper answer, Im off to work.
Rather than remove and replace tabpages, which causes flicker, just swap
pages as you sort. Here's a quick implementation of swap without sort.
\\\
Public Sub SwapTabPages(ByVal tp1 As TabPage, ByVal tp2 As TabPage)
Dim Index1 As Integer = TabPages.IndexOf(tp1)
Dim Index2 As Integer = TabPages.IndexOf(tp2)
TabPages(Index1) = tp2
TabPages(Index2) = tp1
End Sub
///
If you're on about design time order then you'll find the answer here:
http://dotnetrix.co.uk/tabcontrols.html --> Tabpage order has changed
--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
"VJ" <vi********@yahoo.com> wrote in message
news:eg**************@TK2MSFTNGP09.phx.gbl...
Is there a way to Order Tabpages..
I tried to Use a Class that implements the IComparer and a Compare method
as
suggested in the MSDN article. "ArrayList.Sort()" and then use the
instance
of this class to sort like..
tbControl.TabPages.Sort(lstSorter)
There seems to be no effect..... I have tried debugging, the sorting
seems
to happen, but Tabpages don't get rearranged. I even tried Referesh(),
Invalidate() methods.. after sort, nothing seems to work...
VJ
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
http://www.grisoft.com).
Version: 6.0.742 / Virus Database: 495 - Release Date: 19/08/2004