--- title: "How to: Display Side-Aligned Tabs with TabControl" ms.date: "03/30/2017" dev_langs: - "csharp" - "vb" helpviewer_keywords: - "tab pages [Windows Forms], displaying side-aligned tabs" - "tabs [Windows Forms], displaying side-aligned tabs" - "TabControl control [Windows Forms], displaying side-aligned tabs" ms.assetid: 110d5abd-3ae3-4ded-95bf-778aaac798a0 --- # How to: Display Side-Aligned Tabs with TabControl The property of supports displaying tabs vertically (along the left or right edge of the control), as opposed to horizontally (across the top or bottom of the control). By default, this vertical display results in a poor user experience, because the property of the object does not display in the tab when visual styles are enabled. There is also no direct way to control the direction of the text within the tab. You can use owner draw on to improve this experience. The following procedure shows how to render right-aligned tabs, with the tab text running from left to right, by using the "owner draw" feature. ### To display right-aligned tabs 1. Add a to your form. 2. Set the property to . 3. Set the property to , so that all tabs are the same width. 4. Set the property to the preferred fixed size for the tabs. Keep in mind that the property behaves as though the tabs were on top, although they are right-aligned. As a result, in order to make the tabs wider, you must change the property, and in order to make them taller, you must change the property. For best result with the code example below, set the of the tabs to 25 and the to 100. 5. Set the property to . 6. Define a handler for the event of that renders the text from left to right. [!code-csharp[TabControl.RightAlignedTabs#1](~/samples/snippets/csharp/VS_Snippets_Winforms/TabControl.RightAlignedTabs/CS/Form1.cs#1)] [!code-vb[TabControl.RightAlignedTabs#1](~/samples/snippets/visualbasic/VS_Snippets_Winforms/TabControl.RightAlignedTabs/VB/Form1.vb#1)] ## See also - [TabControl Control](tabcontrol-control-windows-forms.md)