Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Highlight Grid Row with Windows System Colors
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00096203
Message ID:
00096235
Vues:
13
>I can't find where this has been covered, so permit me to rehash. I know how to highlight the current grid row, but I want it to conform to whatever strange colors the user has chosen for his desktop. Remembering a tip from UT, I naturally steal the properties from a visible (if available) or invisible listbox or combobox. Being a little lazy for this example, I am using the Grid's tag property to store the current record number, in event AfterRowColChange.

Not quite sure why you're doing all this?? To pick up the user's default highlight colors, you can just use something like, for current recordsource:
In afterrowcolchange:
thisform.recno = recno()

this.SetAll("DynamicBackColor",;
"IIF(recno()=thisform.recno,;
  thisform.colorb,;
  '')", "Column") 
this.SetAll("DynamicForeColor",;
"IIF(recno()=thisform.recno,;
  thisform.colorf,;
  '')", "Column") 
Just pick up thisform.colorf and b from any textbox selectedfore/back colors that use default colors...
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