Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamic Color in Grid
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00244921
Message ID:
00244939
Vues:
28
>I have a grid on a form that sets the dynamicbackcolor and dynamicfore color in the init event of the grid as follows:
>
>public grno
>grno = recno()
>this.setall('DynamicBackColor','iif(recno()=grno,rgb(128,128,255),rgb(255,255,255))','Column')
>this.setall('DynamicForeColor','iif(deleted(),rgb(255,0,0),rgb(0,0,0))','Column')
>
>In the afterrowcolchange event I have:
>
>grno = recno()
>this.refresh()
>
>The results of this is that when the user moves through the records in the grid the entire row shows with the background color (128,128,255) and all the rows have the fore color of 0,0,0 except for deleted records which are 255,0,0.
>
>All of this is fine until the user clicks in the grid. When they click the back color changes to white(255,255,255) and the fore color to black (0,0,0). Is there a way to make the colors stay the same as what is set dynamically?

If you're allowing users into cells and want to keep the colors when in cell, you can use textbox Gotfocus...something like

this.backcolor = appropriate color
this.forecolor = appropriate color
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform