Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to determine TextBox width?
Message
 
 
À
21/09/2009 06:36:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01425392
Message ID:
01425405
Vues:
56
>>>I don't understand the use of TXTWIDTH in the codes, is the code suppose to change the textbox width everytime textbox.value is changed?
>>>
>>>I was looking for a way to determine a shortest fix width of TextBox which will hold any 32 chars string, For example when a form is used just to display field values in TextBox.
>>>I mean, it is possible to calculate this width without taking the string or textbox.value as a factor?
>>
>>It depends on what kind of font the TextBox is using. You can calculate such width for none-proportional font but for proportional font the width will depends on the content of the textbox.
>
>Of course I am talking about general font like arial, verdana and so on.
>I know the width is going to vary for different content, that is why I intend to find a textbox width which can hold whatever content/string as long as it is a 32 chars string. i.e. I am trying to find how wide (the widest possible width in pixel) can a 32 string be, under certain font.

In English the 'W' is is the widest character. You van use a string of 32 Ws to calculate the width.
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform