Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting ColumnWidths In Code
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01034883
Message ID:
01035200
Views:
15
Ok guys, thanks for all the help thus far.

The listbox columns will be read in from a table.

So if the width in the table is 100, and I set the column
header with to 100, then the columnwidth in the list to 100,
the list column is actually wider than the header visually.

How do I use TXTWIDTH() and FONTMETRIC() knowing that I
want to the column to be 100? There is no text here to
use with TXTWIDTH().







>Kevin,
>
>Multiply txtwidth() by fontmetric(6). Depending on your text fontmetric(7) or somewhere between the two fontmetric values might be a better multiplier value to use.
>
>>Ok, I'm not sure exactly how to go about this.
>>
>>
>>? LEN("This is a long caption") && Returns 22
>>? TXTWIDTH("This is a long caption","Arial",9)  && Returns 34.400
>>
>>
>>The width of the container below the label is 119, yet visually the are
>>the same width.
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform