Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid color set using DynamicForeColor. Changes when sele
Message
 
 
À
18/09/2006 01:07:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01154527
Message ID:
01154557
Vues:
12
>>I have a grid with one column. The properties for DynamicBackColor and DynamicForeColor are set.
>>
>>	.Column1.DynamicBackColor = [IIF( people.Lok= .F.,Rgb(0,128,128) , Rgb(255,0,0) )]
>>	.Column1.DynamicForeColor = [IIF( people.Lok, Rgb(255,255,255), Rgb(0,0,0) )]
>>
>>This works fine, unless the user clicks in the column. Then the color changes (to black on white).
>>I don't want the color to change if she clicks in the column. How can I do that?
>>
>>Cyril
>
>set
>
>* .Column1.Text1.GotFocus
>This.BackColor = IIF( people.Lok ,Rgb(255,0,0)    , Rgb(0,128,128)  )
>This.ForeColor = IIF( people.Lok, Rgb(255,255,255), Rgb(0,0,0) )
>
Thanks Fabio and Christof. That explains it.

FYI: I had to put this into the When() rather than the GotFocus(). There is a RETURN .F. in my When(), so GotFocus() did not fire.

Cyril
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform