Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamically Size A Text Box
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00481579
Message ID:
00481599
Vues:
12
>Fred,
>
>Here's what I'm doing to test all this:
>
>
>cTestVal = "Client"
>cFontName = "Arial"
>nFontSize = 9
>nWidth = CEILING(FONTMETRIC(6, cFontName, cFontSize) * TXTWIDTH(cTestVal, cFontName, cFontSize))
>
>_Screen.AddObject("MyText", "Textbox")
>_Screen.MyText.Width = nWidth
>_Screen.MyText.FontName = cFontName
>_Screen.MyText.FontSize = cFontSize
>_Screen.MyText.Value = cTestVal
>_Screen.MyText.Visible = .T.
>

>
>The word 'Client' is truncated in the visible portion of the text box

Adding roughly 8 seems to work (2 * border + a few extra).
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform