Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best way to flip-flop BackColor in boxes on forms?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00287008
Message ID:
00287033
Vues:
22
To further clarification:
DEFINE CLASS txtcolorempty AS textbox

	PROCEDURE Refresh
		this.backcolor = iif(empty(this.value), rgb(255,255,200), rgb(255,255,255))
	ENDPROC

	PROCEDURE InteractiveChange
		this.refresh()
	ENDPROC


ENDDEFINE
>
>I would reccomend doing this in a subclass of your textbox class. I'd put the code in the refresh. If you need the color to change immediately when the user starts typing call this.refresh() from the InteractiveChange event.
>
kenweber
GCom2 Solutions
Microsoft Certified Professional

Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform