MSFlexGrid - font metrics available for adjusting column widths?

M

MyndPhlyp

There doesn't appear to be a MSFlexGrid property to automatically adjust a
column width to fit the contents. It seems to take the column width from the
values placed in the fixed row (ala MSFlexGrid.FormatString). There also
doesn't appear to be a property to enable an "auto resize" if the user
double-clicks between column headings.

Is there a slick way (or even an API call or three) to determine the
displayed length of a string given the font name and size so that the column
width can be programmatically adjusted accordingly?
 
S

Stephen Lebans

Please do not multipost but rather crosspost to your selected NG's at
one time.

See:
http://www.lebans.com/textwidth-height.htm
TextHeightWidth.zip is a replacement for the Report object's TextWidth
and TextHeight methods. It is multiline aware and can work in both
Report and Form views. Includes a sample report to show you how to
autosize individual controls with different formatting on the same line
to simulate RTF style text.
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
M

MyndPhlyp

Stephen Lebans said:
Please do not multipost but rather crosspost to your selected NG's at
one time.

See:
http://www.lebans.com/textwidth-height.htm
TextHeightWidth.zip is a replacement for the Report object's TextWidth
and TextHeight methods. It is multiline aware and can work in both
Report and Form views. Includes a sample report to show you how to
autosize individual controls with different formatting on the same line
to simulate RTF style text.

Thanx. The other post was not intentional.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top