Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Programatically Determine List.ColumnWidths
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01243619
Message ID:
01243853
Vues:
26
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform