Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Height of Text
Message
De
20/02/2002 01:33:01
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00621982
Message ID:
00622373
Vues:
27
>>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.

Off

There is no place like [::1]
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform