>>Hi All,
>>
>>How can I calculate the height of a control (editbox) to show all lines of a string?
>>
>>Thanks in advance
>>
>>Agnes
>
>Take a look at Thread #
575284 for a similar discussion.
Thanks Sergey,
the only thing one height on this thread was the link to alert.prg in download.
Height is calculated there FONTMETRIC(2)+FONTMETRIC(3).
But there is an extra gap between control's top and first lines and last line and bottom of control.
This gap changes with fontsettings, so it must be fontrelated?
FONTMETRIC(4) is defined as 'space between lines' but if I do
.Height = ;
(FONTMETRIC(2,this settings)+FONTMETRIC(3,this settings))*MEMLINES(.VALUE)+
FONTMETRIC(4,this settings)*(MEMLINES(.VALUE)-1)
,I got a big gap at bottom.
Agnes
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]