Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change Grid Highlight to Match column dynamicbackcolor
Message
De
09/09/2005 10:39:05
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01047867
Message ID:
01048126
Vues:
22
New day, fresh start, you know how it goes. I store the default grid backcolor, highlightstyle and highlightcolor to a form property in the form's init. Then in the grid's afterrowcolumnchange if the current control has a special dynamicbackcolor, I set the column sparse to .f., the grid's highlightstyle back to 0 and set the control's backcolor to the dynamicbackcolor of the column. If no columns have a special dynamicbackcolor then I set the grid's highlightstyle to the default value and , then I set the column's sparse property to .t. and the control's backcolor to the default grid's highlightcolor to emulate the highlight. I plan on adding the code to my example form in this thread and posting it so a simple sample is available (the one I am actually working on is rather complicated and generated on the fly with a pageframe with multiple pages and grids).

I'm going to post it because I would still like to do it correctly a better way. For example, I would rather not mess with the column's sparse property if not necessary. But if I do not set the column's sparse property to .t. when there is no dynamicbackcolor or the dynamicbackcolor is the same is the grid's default backcolor, then it always shows as white even if I set it to the grid's highlightcolor. Go figure. That's why as soon as I can transfer the code to the simple sample form I posted I will so everyone can look at it and maybe come up with a better way to do it than I did in my first attempts.
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform