Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid RemoveObject leaves object there...
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Grid RemoveObject leaves object there...
Divers
Thread ID:
00273392
Message ID:
00273392
Vues:
74
Hey all,

I have the following code:

WITH THIS.Columns[i]
* Save properties...
lcPrevCaption = .Header1.Caption
lnPrevAlignment = .Header1.Alignment
* Remove default header object and add our own hdr object .RemoveObject('Header1')
.AddObject('Header1', 'hdr', i)
etc.
etc.
ENDWITH

On the .AddObject line I get an error "Object name is invalid", and the debugger shows that that Header1 still exists for the grid column in question. Why hasn't RemoveObject removed it? And why do I get "Object name is invalid" instead of "Member name already exists".

The above code runs fine once the form is up and fully visible, and it only breaks in the above-described fashion if I execute the code before showing the form the grid is on. Would the visibility have something to do with it? Please advise...

Thanks!

Joe Kaufman
ENCOMPASS Health Mgmt. Systems
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform