Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calculate width of the caption
Message
From
14/12/2018 09:45:15
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01664474
Message ID:
01664476
Views:
61
>Hi,
>
>Simplified example.
>I have a check box on a form. The caption of the check box could change (it is data driven). And if the caption is longer than what I set at design time, I want to widen the form. Question: how do you calculate the width or length of a string?
>
>For example, default caption of a check box: "Company". And it may change (at run-time) to being "Company Name". I need to calculate by how much to increase the width when the caption is longer.
>
>TIA


Check help for FONTMETRIC() and TXTWIDTH()

.
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform