Hello,
I'm using Fpw26.
On a .SCX screen, is it possible to set the field format (font, background color) according to a parameter.
If it's not possible, what is the best way to do so...
Phil,
It is possible, but a bit convaluted. Haven't done it in ages. There are a few ways. Best is to either utilize an existing scheme, or with color pairs. There are 10 pairs that correspond to various states. X/X is black. I don't remember the pairings off the top of my head, but do a search in the help file for color pairs, and it should point you in the right direction.
Best Regards,
Scott
"Everything should be made as simple as possible, and no simpler."
Thank you Scott,
But I would like to find a solution inside the .SCX and not in the .SPR file; because everytime I will change my screen and generate my project, my updates will be erased.
However, I set up my SCXs to automatically intialize all field variables used by the SCX by adding the code to the SCREEN LAYOUT SETUP SNIPPET. I never have errors anymore related to field variables that I forgot to initialize. If I add/delete fields in the SCX, I never need to remember to initialize the variable for that field. And, of course, I never lose the code since I never modify the SPR.
Similarly, you should be able to somehow do what you want to do in the same snippet, although I personally don't know how to make it work.
I would add some of your code to the end of the setup snippet and then play with it to see if you can solve your problem.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.