Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Code to create a contrasting color
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01486509
Message ID:
01486569
Vues:
55
I am not sure if this is what you can use , but I allow the user to set a form to any color. So in the form GotFocus, I check that he hasn't made it ugly, like black letters on black background or vice-versa,
I picked a form backcolor value that is approximately in the middle of 0 to the largest it can get.
* set the font color based on how light or dark the form backcolor is
IF thisform.BackColor > 13882192
	thisform.label1.ForeColor = 0
... and so on
HTH
Ron Seidl
Independent Developer
VFP

"I'm playing in life's theater in anticipation of a great cast party!"
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform