Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change grid header programatically
Message
De
13/09/2013 03:52:48
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
12/09/2013 11:42:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01582929
Message ID:
01583113
Vues:
118
>
>o = CreateObject('grid')
>o.ColumnCount = 1
>? o.column1.RemoveObject('header1')
>? o.column1.ControlCount
>? o.column1.AddObject('header1','someHeaderClass')
>? o.column1.ControlCount
>
>
>Tested OK with VFP9, don't know about VFP7

IIRC this worked fine with VFP7 as well.

The .removeObject() line is unnecessary, I think, because the grid always has one and only one header, so if you remove it, a new one is created automatically, and if you add one, the old one is removed. It's possible that there's a predefined slot for a header which simply holds a baseclass header unless filled with something else.

Not true anymore - you can have a headerless column and if you try to add a header it will complain if it already has one (so my "single slot for header" theory still holds some ground). So the above paragraph may have applied to some earlier version of fox - 6 or 7 or thereabouts.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform