Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best way to flip-flop BackColor in boxes on forms?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00287008
Message ID:
00287033
Views:
21
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

Previous
Next
Reply
Map
View

Click here to load this message in the networking platform