Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid columns get the squeeze
Message
 
À
03/12/1999 12:34:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00298427
Message ID:
00298447
Vues:
13
Peter,

I had this problem too. Although I never figured out why subsequent queries misbehaved, I was able to automatically size the column widths. It was something like the following:

select
for m.x = 1 to fcount()
thisform.grid.columns( m.x ).width = fsize( field( m.x ) )
endfor

The one problem you may have is the field() function will return only the significant places for numerics. I worked around this by multiplying fsize( field( m.x ) ) by a constant.

Another option would be to use the AFIELD() function. This returns the significant and decimal portion of numerics to an array that you can then step through with a FOR/ENDFOR.

Good luck.
Ben
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform