Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying Label's Text Vertically

Status
Not open for further replies.

jonbatts

Programmer
Apr 12, 2005
114
0
0
US
Is there a way to display the text on a label vertically. I'm trying to put labels at the bottom of a graph so I have plenty of vertical space, but not much horizontal space. I know I can use graphics.DrawString with a StringFormat whose FormatFlags is set to DirectionVertical, but I want to do this on a label instead. Any ideas? Thanks.
 
Label1.Text = "L" & ControlChars.CrLf
Label1.Text += "A" & ControlChars.CrLf
Label1.Text += "B" & ControlChars.CrLf
Label1.Text += "E" & ControlChars.CrLf
Label1.Text += "L"

 
How about creating using a bitmap to display the text on?

Create your bitmap, and use graphics.DrawString to put your text into it. You can then use bitmap.RotateFlip to make your text run vertically, and then assign that bitmap to the control?

Perhaps to the Label's Image property?

Corin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top