Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programatically Determine List.ColumnWidths
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01243619
Message ID:
01243853
Views:
25
Yes, I did look at the help.

And, this change results in the ColumnWidths being "0,7,80", which are still
far too small.

Try this small code segment:
LOCAL sColWidths AS String
sColWidths = "0,"

CLEAR
CLOSE DATABASES ALL

CREATE CURSOR Temp1;
 (ID N(4), Caption Character(50))

SELECT Temp1

sFontName = "MS Sans Serif"
iFontSize = 8

FOR iColumn = 1 TO FCOUNT()

	iSize = TXTWIDTH(replicate('O',fsize(FIELD(iColumn))), sFontName, iFontSize)
	
	sColWidths = sColWidths + TRANSFORM(CEILING(iSize)) + ","

ENDFOR

? sColWidths

RETURN
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