Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Grid RemoveObject leaves object there...
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement