bsalsa - Delphi tips, tricks, code snippets,Samples Component Search Engine.

The current search engine database includes about 5000 Delphi web sites and growing...

By pressing the button, you can add the Search engine to your iGoogle. Add to Google


Go Back   EmbeddedWB - bsalsa forum > TEmbeddedWB component > TEmbeddedWB Component
FAQDonate Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 11-21-2009, 02:52 AM   #1
Brandon
Junior Member
 
Join Date: Nov 2009
Posts: 17
Focused property not working?

It appears that the TEmbeddedWB.Focused property always returns false. Even when the embedded browser has keyboard focus, this property is false.

What is the proper way to determine if the browser has keyboard focus?

Thank you!
Brandon is offline   Reply With Quote
Old 11-21-2009, 08:11 AM   #2
smot
Main Developer
 
smot's Avatar
 
Join Date: May 2006
Posts: 937
Hello

Use this function for now:
Code:
function EWBFocused(EmbeddedWB: TEmbeddedWB): Boolean;
begin
 Result := IsChild(EmbeddedWB1.Handle, GetFocus);
end;
TEmbeddedWB.Focused will return the correct result in the next release.

I added the following:

Code:
 
public
   function Focused: Boolean; override;
Code:
 
function TEmbeddedWB.Focused: Boolean;
begin
   Result := IsChild(Self.Handle, GetFocus);
end;
smot is offline   Reply With Quote
Old 11-21-2009, 05:36 PM   #3
Brandon
Junior Member
 
Join Date: Nov 2009
Posts: 17
Thanks!
Brandon is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT +3. The time now is 12:43 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
bsalsa@gmail.com