Text orientation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, I have a list of names from a database such as

Smith
Jones
Baker
Stocks
Chapman
Peters

I would like to display these names as the header of related data as follows

S J B S C P
m o a t h e
i n k o a t
t e e c p e
h s r k m r
s a s
n


or, as below, but each name rotated 90 degrees anti-clockwise. Much like
what you can do with a word table cell and it's text direction.

Smith Jones Baker Stocks Chapman Peters
 
you need to do something like the following to rotate the text thru
90degrees
It should center the text vertically about x, y



StringFormatFlags sff = StringFormatFlags.DirectionVertical;
StringFormat vcFormat = new StringFormat(sff);

vcFormat.Alignment = StringAlignment.Center;

myGraphics.DrawString(text, font, brush, x, y, vcFormat);


Steve
 
The list is in a windows form as a datagrid, but I can't get the list to
display horizontally. Is this possible?

Thanks
 
Back
Top