Hi,

That works but I don't like using the OnMouseMove event to re-enable the panel - it fires constantly. I'll work on improving it and include it in the next version of my code.

By the way the Delphi4 source got into the main Delphi5+ zip somehow so the source you're using isn't the most up to date. Mozdev CVS is down just now so I can't up date the zip there but you can get the latest version here:

http://www.paranoia.clara.net/downloads/taming_the_lizard.zip

To copy the selected text use:

mzGecko.ExecWB(OLECMDID_COPY, OLECMDEXECOPT_DODEFAULT);


Dave Murray Glasgow, UK PGP KeyID: 0x838592B3

Remove NOSPAM from my email address to reply.





Arnaud wrote:
irongut a formul� la demande :

Hi,

I have a tutorial and demo about using the ActiveX control in Delphi on: http://delphi.mozdev.org/

Unfortunately I don't have an answer to your problem. I tried using SetFocus in various places, including the OnDocumentComplete, OnDownloadComplete and OnNavigateComplete2 events. Examining the behaviour of my demo app carefully, switching to another app and then back or pressing tab twice restores focus to my TEdit. There are only two controls on my form that can take focus so it seems the TEdit has focus but isn't recieveing keyboard messages. Very strange.

Sorry I don't have a fix but maybe the extra info will help. Let me know if you come up with a solution.


Solution : I just modify the edtAddress.OnKeyDown event :

procedure TfrmMain.edtAddressKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
var temp : OleVariant;
begin
if (Key = VK_RETURN) then begin
pnlBrowser.Enabled := false;
mzGecko.Navigate(WideString(edtAddress.Text), temp, temp, temp, temp);
end;
end;


And add this lines in then OnMouseMove form :

procedure TfrmMain.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
begin
if (not pnlBrowser.Enabled) and (not mzGecko.Busy) then pnlBrowser.Enabled := true;
end;


So the edtAddress dont lose the focus, and I can select some text in the Mozilla control (but I don't know how I can copy it :-/ )

_______________________________________________
mozilla-embedding mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-embedding

Reply via email to