I agree, SET_FOCUS property is safer or, at least, SKIP <namefield> Regards, Alastair. ----- Original Message ----- From: Dennis McGrath To: RBASE-L Mailing List Sent: Wednesday, October 14, 2009 8:37 PM Subject: [RBASE-L] - Re: Background Color and Focus on Form
20 years ago I leaned to always put my SKIP command at the end of the file before the RETURN. It is so second nature I seldom thin about it anymore. In RBWIN 7.6 though, I often find I prefer to SET_FOCUS to a control. The results are more predictable. Dennis McGrath ------------------------------------------------------------------------------ From: [email protected] [mailto:[email protected]] On Behalf Of Alastair Burr Sent: Wednesday, October 14, 2009 2:32 PM To: RBASE-L Mailing List Subject: [RBASE-L] - Re: Background Color and Focus on Form Glad to be of help... You raise an interesting point about the RETURN - the help makes no mention of the need for one to follow the SKIP _but_ there is a certain logic to it depending on what else the EEP of the calling object might to and what the landing object will then do. Anybody else any thoughts? Regards, Alastair. ----- Original Message ----- From: [email protected] To: RBASE-L Mailing List Sent: Wednesday, October 14, 2009 7:56 PM Subject: [RBASE-L] - Re: Background Color and Focus on Form Hi, Alistair, Thank you so much -- that did the trick. I did figure out that whenever you do a SKIP n, the next command needs to be a RETURN because control eventually will return to the command following the SKIP n. Thanks again, Diane DeMers [email protected] DeKalb, IL In a message dated 10/13/2009 11:00:57 A.M. Central Daylight Time, [email protected] writes: Diane, Is this one of those cases where you are not "technically" leaving the control and thus not firing everything as you expect? Maybe you could try to let the focus move from this field to the next and then SKIP -1 from that next field if your conditions for progress are not met... Regards, Alastair. ----- Original Message ----- From: [email protected] To: RBASE-L Mailing List Sent: Tuesday, October 13, 2009 4:45 PM Subject: [RBASE-L] - Re: Background Color and Focus on Form Hi, Jan, In my post, I've just given an example - I just mistyped the example (I did it pretty late at night); in my actual database, the problem exists - I've been able to recreated it using existing forms and creating new forms. I don't get any error messages in my actual forms when I run them; it's just that when you exit a field via a SKIP 0 or set_focus property, the field's color doesn't return to the original color - it stays the color that it was when it had the focus. Thanks, Diane In a message dated 10/13/2009 9:54:18 A.M. Central Daylight Time, [email protected] writes: This is only a guess but I think you getting an error makes all bets are off on the rest of your scenario. Figure out the error first and then see if you get the expected results on the colors. Jan -----Original Message----- From: [email protected] To: [email protected] (RBASE-L Mailing List) Date: Tue, 13 Oct 2009 10:35:12 EDT Subject: [RBASE-L] - Re: Background Color and Focus on Form Sorry, I made a couple of mistakes in my code...see revised code below: Hi, Has anyone run into background color problems when trying to use a Skip 0 (or a property <ComponentID> set_focus "true") in an Exit EEP with the "background color when focused" set? I have a DBEdit field, RPDYEAR, TEXT 4, whose color is white and whose background color is gray when it has the focus. The Component ID for this field is FORM_RPDYEAR. I have an On Exit EEP for the field RPDYEAR that says: set var vtemp text = null getproperty form_rpdyear textvalue "vtemp" if vtemp <> "2009" then pause 1 using "Invalid value" skip 0 (or property form_rpdyear set_focus "true") endif return -- When you tab to that field initially, it becomes gray when it gets the focus. -- When you tab out of that field, it returns to color white. -- If you are in the field and delete the value and hit <enter>, you will get the message "Invalid value"; and if you THEN enter "2008" (or some other value not equal to 2009) and hit <enter>, the field SHOULD change back to white when the cursor goes to the next field; but it remains gray - the background color when the field has the focus -- even though the field no longer has the focus. Does anyone know a work-around or is this just a bug in 7.6/Turbo 8? The background color only stays "stuck" if I use a SKIP 0 (or the set_focus property) in my Exit EEP; and it happens on any form I try it on so I know it's not just this form or field. ------------------------------------------------------------------------ No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.421 / Virus Database: 270.14.12/2431 - Release Date: 10/12/09 13:01:00 ---------------------------------------------------------------------------- No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.421 / Virus Database: 270.14.16/2435 - Release Date: 10/14/09 06:33:00 ------------------------------------------------------------------------------ No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.421 / Virus Database: 270.14.16/2435 - Release Date: 10/14/09 06:33:00

