Bpoffen
09-05-2003, 11:15 AM
Is there a way to rotate the text appearing in a flexgrid (Please see attachment for an example of what I am looking for). My header strings are larger than the data contained in the flexgrid, so I would like to rotate the text 90 degrees to save room. I've searched the posts and haven't found anything like this that pertains to the flexgrid.
Any help would be appreciated.
Thinker
09-05-2003, 06:21 PM
I guess you could put the text in a graphic and load the graphic into the
header row cells.
Bpoffen
09-05-2003, 06:32 PM
Thanks for the prompt response. I believe your suggestion might do the trick.
I have code that will rotate text in a picturebox, but I'm not sure how to add the picture boxes to the flexgrid on the fly. The number of columns will be set at run time.
Thinker
09-05-2003, 06:38 PM
MSFlexGrid1.Row = 0
MSFlexGrid1.Col = 0
Set MSFlexGrid1.CellPicture = LoadPicture("pathandfilename.bmp")
Bpoffen
09-05-2003, 06:47 PM
If possible, I would like to avoid having to save a bitmap for each column header. Instead, I was hoping to add a PictureBox, on the fly, to each column header and then write to it using some vertical-text code I have.
Bpoffen
09-05-2003, 11:27 PM
Unfortunately, I don't know how to add PictureBoxes to FlexGrid cells at run time. Any help would be appreciated.
Flyguy
09-06-2003, 11:17 AM
Thinker already showed you...
The LoadPicture function returns a picture object so you can just do:
Set MSFlexGrid1.CellPicture = Picture1.Picture