Thread View: borland.public.cppbuilder.internet.web
4 messages
4 total messages
Started by Albert Wiersch
Thu, 24 Feb 2005 20:44
TCppWebBrowser, Focus, and Refresh()
Author: Albert Wiersch
Date: Thu, 24 Feb 2005 20:44
Date: Thu, 24 Feb 2005 20:44
12 lines
1195 bytes
1195 bytes
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/
Re: TCppWebBrowser, Focus, and Refresh()
Author: Albert Wiersch
Date: Tue, 01 Mar 2005 00:06
Date: Tue, 01 Mar 2005 00:06
31 lines
1750 bytes
1750 bytes
Anyone have a solution as to why the Refresh() method takes focus? Perhaps a workaround so that I could find out the currently focused window/control and then revert back to it after I call Refresh()? I briefly experimented with this but couldn't find something that worked. Thank you. -- Albert Wiersch http://www.htmlvalidator.com/ "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/ > > >
Re: TCppWebBrowser, Focus, and Refresh()
Author: James O'Brien
Date: Tue, 01 Mar 2005 03:23
Date: Tue, 01 Mar 2005 03:23
36 lines
2115 bytes
2115 bytes
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/ > > >
Re: TCppWebBrowser, Focus, and Refresh()
Author: Albert Wiersch
Date: Wed, 02 Mar 2005 02:50
Date: Wed, 02 Mar 2005 02:50
65 lines
3315 bytes
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/ >> >> >> > >
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads