Click here to Skip to main content
15,893,644 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I am working on .Net 2008 window application. I have a tab control on MDI form with lift align. How to change text of the Tabs to vertically.
Posted
Updated 30-Jan-12 7:38am
v2
Comments
Sergey Alexandrovich Kryukov 30-Jan-12 13:26pm    
It must be Windows.Forms application. So, please add the tag: "WinForms". First advice: get rid of this ridiculous MDI.
--SA
divesh12 30-Jan-12 13:38pm    
ok

1 solution

First... why do you have your Tab control in your MDI form? The purpose of an MDI is to serve as a container for other forms; putting controls in an MDI defeats this purpose.

Second... When a Tab control is set to left or right align, the tab text is positioned to put the top of the text against the outside edge. As far as I know, the only way to change this behavior is to subclass the control and draw the text yourself. That is a pretty complex project, though: I find it easiest to keep the tabs at the top of the page, or to avoid the Tab control and use a button bar to manually swap panels in and out.
 
Share this answer
 
v2
Comments
divesh12 30-Jan-12 13:44pm    
Add tab on MDI for the show open forms in tab.
Gregory Gadow 30-Jan-12 13:59pm    
If all you want is a list of open forms, you can use the MenuStrip, which you probably already have on the MDI (that and the StatusStrip are the typical exceptions to the "no controls on a MDI" rule.)

Add a top-level menu on your MenuStrip ("Windows" is the traditional label.) On the ToolStrip control, find the property MdiWindowListItem and put set it to the name of the "Windows" menu. Now, the operating system will keep track of the open child windows as menu items under "Windows", allowing the user to change from one form to another by selecting the desired form. It will even put a highlighted checkmark next to the active window. Because this is done at the bottom of the menu, you can add other menu items on "Window" as well, such as options to reorganize child forms to cascade or tile them horizontally or vertically. Keep in mind that the Text property of the child forms (the part that is displayed in the form's title bar) will be the text for its menu.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900