Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
re VFP:Changing colors in TEXTBOX
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00006207
Message ID:
00006210
Views:
51
> And all my commandbutton click procedures have: > thisform.txtName.forecolor=iif(names.gender='DAM',255,iif(names.gender='SIRE',16711680,65535)) > thisform.txtSire.forecolor=iif(sires.chef='N',16711680,65535) > thisform.txtDam.forecolor=255 > thisform.Refresh As Arnon said, this is not very efficient. You don't need the above code in every commandbutton click procedure. It's enough to put each command from above in the coresponding refresh procedure (i.e.:this.forecolor=iif(names.gender='DAM',255,iif(names.gender='SIRE',16711680,65535)) in txtName.Refresh and so on). Because if you want to change such a color, you'll do it in a single place, not in every commandbutton click procedure
Previous
Reply
Map
View

Click here to load this message in the networking platform