Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamic forecolor problem - VFP 8.0 grid
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00795076
Message ID:
00795326
Vues:
34
>hello,
>
>i have a simple grid on a VFP 8 form. i want the text in one column to appear in blue if the person is a male and red if a female. i am having a devil of a time trying to get it to work. first of all there is no error message, the text simply appears as before. secondly i am using the gridhighlighter object to highlight the row of the grid; could that be causing the dynamicforecolor event to not fire correctly?
>
>thnx,
>
>nancy

Hi Nancy,

If you have your Dynamic expression entered in the column Dynamic... property, then GHL just overrides it at runtime.
If you want to have multiple cells color-selected in one(or more) column while using GHL, you can simply override the column expression in GHL instance .onPostHighlight_Row() method like this:
lcHost = THIS.chostname
this.parent.&lcHost..Column2.DynamicBackColor = "IIF(yourrecordsource.Sex, RGB(255,0,0), RGB(0,0,255))"
* Assuming the column2 is the column where you want the colors set.
* Note that you have to add this code into GHL instance on the form, not into the class itself.
Note also, that GHL works properly in VFP 8 with columns that have their .Sparse property set to false. :)
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
Répondre
Fil
Voir

Click here to load this message in the networking platform