Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / October 2004

Tip: Looking for answers? Try searching our database.

how to make the layout of a tabcontrol right to left?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ahmed - 03 Oct 2004 02:33 GMT
Hi all,
the tabcontrol displays tabpages buttons from left to right, how can I
mirror it so it will start from the right?
Mick Doherty - 03 Oct 2004 13:03 GMT
You can create your own Mirrorable (that may not be a real word) Tabcontrol.

A VB solution.
Inherit from TabControl and place the following code in the class.

\\\
Protected Overrides ReadOnly Property CreateParams() As
System.Windows.Forms.CreateParams
   Get
       Dim cp As CreateParams = MyBase.CreateParams
       Const WS_EX_LAYOUTRTL As Integer = &H400000
       Const WS_EX_NOINHERITLAYOUT As Integer = &H100000
       If Me.Mirror Then
           cp.ExStyle += WS_EX_LAYOUTRTL Or WS_EX_NOINHERITLAYOUT
       End If
       Return cp
   End Get
End Property

Private m_Mirror As Boolean = False

Public Property Mirror() As Boolean
   Get
       Return m_Mirror
   End Get
   Set(ByVal Value As Boolean)
       If m_Mirror = Value Then Return
       m_Mirror = Value
       MyBase.UpdateStyles()
   End Set
End Property
///

Signature

Mick Doherty
http://dotnetrix.co.uk/nothing.html

> Hi all,
> the tabcontrol displays tabpages buttons from left to right, how can I
> mirror it so it will start from the right?
Mick Doherty - 03 Oct 2004 14:22 GMT
You'll now find this solution in VB and C# on my site.
http://dotnetrix.co.uk/tabcontrols.html

Signature

Mick Doherty
http://dotnetrix.co.uk/nothing.html


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.