Window Label Fun (AREV Specific)
At 07 JUN 2001 11:48:18PM Jeff Ritchie wrote:
Ok cannot get this to work. Wont to put a label on a window, then write some code that changes it's colour dependant on what key the window gets. Also to flash under one condition. Have tried the Smart label option with the @ variable for blinking, and the label disappeared. The manual as usual is no help.
At 08 JUN 2001 06:02AM Warren wrote:
Some things in ARev Windows take more work than it is worth to get them to do what you want - smart labels is one of them (at least IMHO). I believe there was an extensive thread or two on this subject (none of which I followed). You should probably do a search with the word color (or colour).
At 08 JUN 2001 10:05AM michael slack wrote:
Look in your Window Common Reference manual at WC_W%. That is the window variable that holds the prompt definitions for a given screen. It will tell you to see WC_SI% for the structure of the WC_W% because they are the same. It looks like you might want to look at DA$ ~ . WC_W%(prompt number), this is what you'll need to manipulate your label and other things on a prompt. For example, WC_W%(3) or WC_W%(3) (these are exactly the same) will allow you to change the color attribute on the label of the third prompt on a window.
You can hard code the prompt number into your code or you can make it a little more flexable. Here is a little piece of code that I developed not that long ago to look for the prompt position number by using the dictionary position number. What makes this more dynamic that usual is that I genereally use equated values to indicate @RECORD postion numbers. We use the "$" on the end of a variable to indicate that it's a equate value. With a piece of code like this you can change the dictionary postion number or insert or delete prompts on the screen and it will work without needing to modify the code. It does add a bit more processing to your screen so you need to determine which is best for you.
FOR I=1 TO WC_W_CNT%
IF (WC_W%(I)=WO_DATE_MTR1_RDG$) OR (WC_W%(I)=WO_DATE_MTR2_RDG$) THEN
WC_W%(I)=CHAR(27):'C31' ;* PROMPT COLOR: DARK-BLUE ON DARK-CYAN
WC_W%(I) - 'P' ;* ENTRY TYPE: P=PROTECTED
END
NEXT I
To take advantage of the DA$, VA$, ET$ and others, you'll need to insert SYSINCLUDE, MT_LCPOSITIONS into your program along with your window commons.
I hope this helps.
Michael Slack
At 12 JUN 2001 07:34PM Jeff Ritchie wrote:
Thanks for the replies Michael & Warren. Unfortunatly we have to follow through on this thing, as the operator needs to be visually made aware of a couple of situations before proceeding with input, on-line and real time.
At 14 JUN 2001 08:10AM [url=http://www.sprezzatura.com" onMouseOver=window.status=Click here to visit our web site?';return(true)]The Sprezzatura Group[/url] wrote:
Should just be able to change the label text and insert the colour codes around it.
World Leaders in all things RevSoft
At 14 JUN 2001 09:03AM Bill Titus wrote:
Jeff,
You might take a look at Larry Wilson's PROMPT_ACTION subroutine on the Downloads page at his site.
http://www.advancedrevelation.com
Bill