Manipulating label's in a window? (AREV Specific)
At 16 AUG 2001 06:28:17PM Michael Slack wrote:
Thru the WC_SI% variable in a window, I can manipulate a prompt but I can't seem to effect the label connected to that prompt.
I have a pre-existing window that I have to modify. Depending on the data in the record for the window, I need to hide and make unavailable one set of prompts or the other. It is simple enough to change the prompt to Protected and black on black (black is the background of the window). This makes the prompt effectively disappear. When I try to extend the same thing to the label of the prompt, nothing happens.
Any ideas on how I can make prompt's label change color just like the prompt?
The prompts and their labels that I've been working with on this one have all been bound to real fields. I have a simple little FOR loop that looks thru the WC_SI% varaible looking for a dictionary position number match with the prompts I want to manipulate. When it finds a match, it changes the prompt accordingly. I do this so I don't hard code the prompt numbers into the code. I have one prompt that is attached to a symbolic, is there anyway that I can find it's prompt number or do I need to hard code that? Like the other prompts, I want to make it blend into the windows background color so that it is unseen by the user when the right set of conditions apply.
Thanks,
Michael Slack
At 16 AUG 2001 08:52PM David Kafka wrote:
For a different approach, take a look at this snippet of 1.16 code:
in this particular window, the code is executed post read. If the @ID is an existing record, one set of prompts is displayed. If it is not an existing record, an alternate set are displayed. The basic idea is to build the common variable REDISPLAY.LIST (I guess WC_Redisplay_List) and then set WC_Display_Action to 7. Sorry, I am too rusty in 3.12 to quickly translate, but hopefully you will get the idea.
CASE BRANCH=POST.READ' OR BRANCH=POST.INIT'
determine which prompts to display
build REDISPLAY.LIST
assumes all the LAB.nnn F prompts immediately precede the respective S promptsREDISPLAY.LIST=1IF BRANCH=POST.INIT' OR {IN.INVENTORY.MASTER}=Yes' THENTOTAL.PROMPTS=COUNT(PROMPTS, @FM) + 1FOR I=2 TO TOTAL.PROMPTSIF PROMPTS=S' OR (PROMPTS=F' AND NOT(INDEX(PROMPTS,'LAB.',1))) THEN
this is not one of the LAB F prompts, so include in listREDISPLAY.LIST:=@FM:IENDNEXT INEW.W.CNT=COUNT(REDISPLAY.LIST,@FM)+1WI.NEXT=NEW.W.CNT-20; * assumes last 20 prompts in window are technical propertiesEND ELSEFOR I=2 TO COUNT(PROMPTS,@FM) + 1IF PROMPTS=F' AND INDEX(PROMPTS,'LAB.',1) ELSE
as long as the immediately preceding prompt is not one of the LAB F prompts, include in the listREDISPLAY.LIST:=@FM:IENDNEXT IWI.NEXT=3ENDDISPLAY.ACTION=7