>Hi,
>
>I want to determine the precise width in pixel of a string.
>In my Grid class, I want to optimize the space of the columns
>without cutting the header's caption
>
>I use the max(len..)) approach with Transform for the Inputmask
>that gave me the correct caracter length but is there a way to determine the pixel length.
>
>Exemple.
>column: "123 456" = 7 car. * fontsize(9) = 69 but can fit in 60 pixels
>
>The caption header is in bold
>Header: "test" = 4 car. * fontsize(9)+1 = 40
> ^--Bold
>
>Steve,
>Thanks in advance for you suggestions
You can calculate precize pixel length using FONTMETRIC(), but just for proportional font.
Edward Pikman
Independent Consultant