🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.web
Article #1295

Re: TCppWebBrowser, Focus, and Refresh()

#1295
From: Albert Wiersch
Date: Wed, 02 Mar 2005 02:50
65 lines
3315 bytes
Hi James,

Thanks for trying this out. I did some more testing and something weird is 
happening. It may not be the web browser.

What I found out was that it didn't take the focus from my edit control 
until I clicked on TCppWebBrowser then went back to the edit control. From 
then on, subsequent refreshes made the browser take control from the edit 
control. If I started the process over again with a new document in the edit 
control and new URL in the browser, then it would work again, until I 
clicked somewhere (or did something else) in the browser... at which point 
refreshing the browser would again take the focus from the edit control. If 
I don't click or do anything in the browser control, then it works correctly 
and doesn't take the focus from the edit control. Very strange.

I have a timer that auto refreshes the web browser every 10 seconds.

-- 
Albert Wiersch
http://www.htmlvalidator.com/


"James O'Brien" <obrien@niscnet.com> wrote in message 
news:4223e03d$1@newsgroups.borland.com...
> Hello Albert,
>
> This isn't any help, but I tried to duplicated the behavior you described
> and couldn't.  Heres the steps I took;
>
>  - Created toolbar button whose "OnClick" event-handler makes a call to
> Browser's Refresh() method.
> - Compile/Run program
> -  Load HTML file into Browser window using navigate.
> -  Force keyboard focus to an TEdit control on the main form by clicking
> with mouse
> -  Press toolbar button to refresh Browser control and TEdit control still
> has keyboard focus.
>
> Does the HTML page you're refreshing have any java script which could be
> setting focus of a input field with in HTML document?
>
> James O'Brien
>
> "Albert Wiersch" <mrinternetnewsborland@wiersch.com> wrote in message
> news:421e3c72@newsgroups.borland.com...
>>
>> When I call the Refresh() method of TCppWebBrowser, the browser steals 
>> the
>> focus. This doesn't happen when the Navigate() method is called.
>>
>> How can I stop the Refresh() method from taking the focus and giving it 
>> to
>> TCppWebBrowser?
>>
>> Thanks.
>>
>> -- 
>> Albert Wiersch
>> http://www.htmlvalidator.com/
>>
>>
>>
>
> 
Technical Details
Message-ID: <422529ed$2@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!feeder2.on.meganewsservers.com!meganewsservers.com!textfeed1.on.meganewsservers.com!38.119.100.83.MISMATCH!news-out.nntp.be!propagator2-sterling.newsfeeds.com!news-in.nuthinbutnews.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <421e3c72@newsgroups.borland.com> <4223e03d$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,44b7dea550a8a14b
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Albert Wiersch" <mrinternetnewsborland@wiersch.com>
Newsgroups: borland.public.cppbuilder.internet.web
References: <421e3c72@newsgroups.borland.com> <4223e03d$1@newsgroups.borland.com>
Subject: Re: TCppWebBrowser, Focus, and Refresh()
Date: Tue, 1 Mar 2005 20:50:42 -0600
Lines: 67
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 70.244.73.182
Message-ID: <422529ed$2@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1109731821 70.244.73.182 (1 Mar 2005 18:50:21 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!feeder2.on.meganewsservers.com!meganewsservers.com!textfeed1.on.meganewsservers.com!38.119.100.83.MISMATCH!news-out.nntp.be!propagator2-sterling.newsfeeds.com!news-in.nuthinbutnews.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail