Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Gridhighlighter Invalid dynamic forecolour - problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00770867
Message ID:
00771490
Vues:
15
>>Nadya
>>
>>Thanks again.
>>
>>I have reviewed Nick's documentation. If there is only 1 grid it can be called grid1 - no changes are required to GHL properties.
>>
>>Your comment that the grid is destroyed before GHL is probably true - maybe removing and re-adding it will solve this - see Elmer Adkins's comments in this thread.
>>
>>Much appreciated as always
>>
>>Colin
>
>It could be the reason, but may be it lies in some code... I believe, that Nick discussed this issue before (about incorrect sequence of destroying) and must have found a solution...
>
>Hopefully, he would jump into the thread at some point. Anyway, deleting and re-adding is definetely worth a shot.

Elmer may be right, if it happens on form closing. Maybe because of the changes in ZOrder of the form controls GHL gets destroyed before the grid. Then, when grid tries to evaluate the Dynamic... properties one last time, GHL is already not there and GHL.nRecno property (that Dynamic.. expression checks) also is gone already, which causes Invalid Dynamic expression... error.

GHL itself has the code in Destroy method that checks for the grid existence and resets the Dynamic properties to nothing. But if the object destruction happens in the reverse order, the Dynamic expression may point to non-existent GHL control property.

Colin may want to check if there is any code in the form that might change ZOrder of the form objects at runtime.

I will see what is possible to do about that. Since GHL is Custom object, it does not have ZOrder method. Maybe it will make sense to base GHL on the visibe object (say, Line, with .Visible = .f.) and include the call to ZOrder(0) to HighLight_Row() method. Provided I can reproduce the situation. It might be also the internal grid problem.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform