Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to determine TextBox width?
Message
De
21/09/2009 00:57:21
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
How to determine TextBox width?
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01425392
Message ID:
01425392
Vues:
145
Hi,

I have a TextBox control which is bound to a C32 field.

How do I programatically find out the shortest width of the TextBox and make sure any 32 characters inputed will be displayed fully in the textbox?

I was thinking:
TextBox.Width = 32 * FONTMETRIC(7, TextBox.FontName, TextBox.FontSize)

But FONTMETRIC(7) is crazy... for Arial font size 10, it gives me 35 about 6 time of FONTMETRIC(6)...
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform