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
Divers
Thread ID:
00273392
Message ID:
00273424
Vues:
11
Hi Terry,

I am doing the same for a long time no problems
With the form Invisible.

If you are sure you don't have pending object ref. try this code.
I solve similar problem with It ( but not with header object)

DO WHILE TYPE(".Header1")=="O"
.REMOVEOBJECT('Header1')
ENDDO

Marcel

>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform