C # Design Tags I don't know if there is any vertical set of text settings. I have a friend asking me this question. I didn't find a direct way. Now I'm extracted by my design is as follows:
Using system.drawing; using system.windows.forms ;. USING SYSTEM.WINDOWING;
Public class form1: form {private label label1; private system.componentmodel.container components = null;
Public Form1 () {// Initialization InitializeComponent ();} // Remove Resource Protected Override Void Dispose (Bool Disposing) {if (component! = NULL) { Components.dispose ();}} Base.Dispose ();} private void initializeComponent () {label1 = new label (); suspendlayout (); label1.location = new system.drawing.point (60, 10); label1 .Name = "label1"; label1.tabindex = 0;
// Here is the key, you must give the text content first, of course, if the text is fixed, it can not follow the label1.text = "vertical text design mode"; // This must ensure that the width of the Label is greater than one word width. Small than two words width label1.size = new system.drawing.size (int) label1.font.size 8, label1.font.height * label1.text.length); // Set the text of Label1.TextAlign = ContentAlignment .MiddleCenter; label1.autosize = false; / / must be set to false, do not let him automatically calculate
AutoScaleBaseSize = new System.Drawing.Size (6, 14); ClientSize = new System.Drawing.Size (216, 125); Controls.Add (label1); MaximizeBox = false; MinimizeBox = false; Name = "Form1"; Text = "Test vertical text!"; ResumeLayout (false);
} Static void main () {Application.run (new form1 ());}}