MSFlexGrid - font metrics available for adjusting column widths? 
Author Message
 MSFlexGrid - font metrics available for adjusting column widths?

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?



Mon, 19 Nov 2007 22:47:09 GMT  
 MSFlexGrid - font metrics available for adjusting column widths?
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.


Quote:
> 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?



Tue, 20 Nov 2007 00:14:09 GMT  
 MSFlexGrid - font metrics available for adjusting column widths?



Quote:
> 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.


Tue, 20 Nov 2007 03:38:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Adjusting column width programatically...

2. Adjust column width

3. Problems with adjust column width

4. AUTO ADJUST COLUMN WIDTH

5. Column width adjust error

6. Adjusting column widths involving merged cells

7. Adjusting column widths involving merged cells

8. Excel column width authmatically adjusts

9. How to adjust the width of the column in datasheet view

10. Adjusting column Widths with Double Click


 
Powered by phpBB® Forum Software © phpBB Group