When the web / pdf is displayed in the WebBrowser control, focus is on the 
control and actually  your other two commands have already executed, this is 
why the focus is on the WebBrowser.

I have it working properly on my machine, but you need to put your two 
property commands in the onNavigationComplete EEP, this way the page will be 
loaded and then the focus will be directed back to your other control.

Incidently, I could not get a PDF to display in the WebBrowser without 
putting "ProcessMessage" after the GOURL property command.  This lets the 
WebBrowser do its thing while the subsequent commands, if any are executed.

This is what I have in my button EEP that executes the GOURL:

SET VAR vdisplayname TEXT = ((CVAL('CurrDir')) + '\GooglePage.pdf')
PROPERTY wbone gourl .vdisplayname
PROCESSMESSAGE
RETURN


This is what I have in my onNavigationComplete EEP:

SET VAR vdisplayname TEXT = ((CVAL('CurrDir')) + '\GooglePage.pdf')
RECALC VARIABLES
PAUSE 2 USING .vdisplayname
PROPERTY id_vfolder set_focus 'TRUE'
PROPERTY id_vfolder lastchar 'true'
RETURN


A footnote:  I was losing the value of the variable vDisplayName between the 
button push and the onNavigationComplete EEP and I didn't take time to 
figure that out.



----- Original Message ----- 
From: "Michael J. Sinclair" <[email protected]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Tuesday, August 21, 2012 8:30 AM
Subject: [RBASE-L] - Re: Property componentid GOURL varname makes me lose 
mycursor


Alastair,

I did try that. I put this...
PROPERTY id_vfolder SET_FOCUS 'TRUE'
PROPERTY id_vfolder LASTCHAR 'TRUE'
At the very top of the eep
and this...PROPERTY id_bigpdf GOURL .vdisplayname
at the bottom.
Same issue. The SET_FOCUS works, but the GOURL steals the focus and won't 
give it back to the SET_FOCUS when it's done displaying the file. The PAUSE 
FOR n some how is able to retrieve the focus and then hand it off to the 
SET_FOCUS command.
I don't know if the Web Control would benefit from an enhancement request 
regarding it's effect on FOCUS. I may just not be understanding how the 
GOURL command is supposed to affect the focus. I can't think of any good 
reason why the GOURL should want to affect the FOCUS when my goal is to 
display a file. The only property that the Web Control has that I can 
control is "Tab Stop". Unchecking Tab Stop did not seem to affect the FOCUS.


Mike

________________________________
From: Alastair Burr <[email protected]>
To: RBASE-L Mailing List <[email protected]>
Sent: Tuesday, August 21, 2012 2:52 AM
Subject: [RBASE-L] - Re: Property componentid GOURL varname makes me lose 
mycursor


Have you tried changing the sequence of the property commands?


Regards,
Alastair.



From: Michael J. Sinclair
Sent: Monday, August 20, 2012 11:42 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: Property componentid GOURL varname makes me lose 
mycursor
Hi Jan,
It works perfectly when I trace it, so I thought it would be a timing issue.
Pause for 5 did not work, but ...
Pause for 1 USING 'Bam!'
does seem to make it work better. Seems like I need to have the focus 
shifted away from the Web Control after the GOURL command to get the 
following commands to work. The only issue with my work around seems to be 
the highlighting of the characters based on checking AUTOSELECT...the 
characters are no longer highlighted, but that is not a big deal.
Mike



________________________________
From: jan johansen <[email protected]>
To: RBASE-L Mailing List <[email protected]>
Sent: Monday, August 20, 2012 6:28 PM
Subject: [RBASE-L] - Re: Property componentid GOURL varname makes me lose 
mycursor


Mike,

Does your field get the focus if you TRACE the command?

Possibly a timing issue.
Maybe try a PAUSE FOR 2 after the
PROPERTY id_bigpdf GOURL .vdisplayname
to give it time to process.
Does your field get the focus if you TRACE the command?

Jan

-----Original Message-----
From: "Michael J. Sinclair" <[email protected]>
To: [email protected] (RBASE-L Mailing List)
Date: Mon, 20 Aug 2012 15:13:39 -0700 (PDT)
Subject: [RBASE-L] - Property componentid GOURL varname makes me lose my 
cursor


Hi All,
>In an eep, if I have this ...
>
>PROPERTY id_vfolder set_focus 'TRUE'
>PROPERTY id_vfolder lastchar 'true'
>RETURN
>
>The focus goes right where I want it, ie the end of the last character in 
>my variable edit field
>
>But, if I have this...
>
>PROPERTY id_bigpdf GOURL .vdisplayname
>PROPERTY id_vfolder set_focus 'TRUE'
>PROPERTY id_vfolder lastchar 'true'
>RETURN
>
>The focus initially goes where it is supposed to go, but then it is "lost", 
>I can't see a cursor anywhere.
>I have to click on the field at the end of the last character to make 
>changes to the field.
>When I trace it, it works fine with or without the GOURL.
>Even stranger, I have "AUTOSELECT" checked for the desired field, and the 
>characters are all still selected, but no cursor!
>
>Why is the PROPERTY id_bidpdf GOURL .vdisplayname command causing me to 
>lose my cursor or the cursor location?
>
>Mike 


Reply via email to