Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Aligning data in the grid fields
Message
De
11/08/2005 07:07:29
Richard Candeland
Richard Candeland Software Services
Keighley, Royaume Uni
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01039487
Message ID:
01040140
Vues:
9
Hi, Neil,

To me it sounds like Fox is deciding what alignment to give that column before you have populated the grid with your recordsource. I can remember similar happening to me in VFP 3.0, but not in more recent versions.

Do you set the grid's recordsource in your form's init? If so, the grid's init will have already run and it may have initially picked up another cursor or file as it's recordsource. It will use any cursor or file in the currently selected area when the grid is initialised. I find this quite annoying sometimes. Use debug to find out what table is current when the grid is initialised.

I played around a bit trying to recreate your problem but couldn't but I could get it to give me strange column widths. I generally put a 'select 0' as the last command in my form's load to stop it doing this, but this isn't foolproof as code buried deep in parent classes of controls loaded between the forms load and the grid's initialisation
can still produce grids with unexpected properties if they select an alias.

Hope this helps.
Richard
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform