May 5th, 2003, 10:07 AM
#1
vertical text
Hi,
how can i rotate a text (label) 90 degrees in Visual Studio, like the vertical tabs(e.g. Toolbox on the left)?
Thanx in advance
Schirr
Attached Images
May 5th, 2003, 12:41 PM
#2
you will need to have the Paint Method overloaded and write the text manually.
-Paresh
- Software Architect
May 5th, 2003, 02:46 PM
#3
Thx, but that sounds too hard for me, as i'm relative new to programming.
So, if anyone knows an easier way, i would be very grateful.
Schirr
May 6th, 2003, 05:05 PM
#4
pareshgh is right, but it isn't that hard.
Here's some sample code to work with:
this.Paint += new PaintEventHandler(DrawTab);
Private void DrawTab()
{
base.OnPaint();
Graphics g = this.CreateGraphics();
g.Clear(this.BackColor);
g.DrawString( "hello world",
this.Font,
new SolidBrush(this.ForeColor),
0, 0,
new StringFormat(StringFormatFlags.DirectionVertical));
}
Last edited by radlradl; May 6th, 2003 at 05:08 PM .
May 6th, 2003, 05:33 PM
#5
see there you go.. thanks for the sample. was bit lazy for overriding the paint
- Software Architect
May 7th, 2003, 02:35 AM
#6
Thx a lot for the sample, on my own i'd never get that, i'm still learning the language and i don't know what's possible.
May 7th, 2003, 05:08 PM
#7
no problem, post your problem and someone will definitely solve it
- Software Architect
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width