![]() |
SetFocus in Webbrowser ?
Hallo
wie mach ich Focus in eine bestimmte Feld in Webbrowser ? mit javascript ist :
Delphi-Quellcode:
<script type="text/javascript" language="JavaScript">
document.forms['myform'].elements['Felde1'].focus(); </script> |
Re: SetFocus in Webbrowser ?
Ich würde ja vermuten, dass dieses DispatchInterface auch in Delphi so funktioniert. Hast du das schon probiert?
|
Re: SetFocus in Webbrowser ?
Hallo
Mir sind zwei Möglichkeiten bekannt. 1.
Delphi-Quellcode:
{2}
uses
ActiveX; with WebBrowser1 do if Document <> nil then with Application as IOleobject do DoVerb(OLEIVERB_UIACTIVATE, nil, WebBrowser1, 0, Handle, GetClientRect); end;
Delphi-Quellcode:
PS: Viele Antworten auf Fragen findest du schon via DP Suche oder via Google:
uses
MSHTML; begin if WebBrowser1.Document <> nil then (Webbrowser1.Document as IHTMLDocument2).ParentWindow.Focus; end; ![]() |
Re: SetFocus in Webbrowser ?
Und wie kann ich den Focus in ein Feld zuweisen, so das er drinnen blinkt ?
|
Re: SetFocus in Webbrowser ?
Wahrscheinlich genau wie beim JavaScript auch. Siehe sirius' Kommentar, dessen Vermutung ich teile.
|
Re: SetFocus in Webbrowser ?
Zitat:
Delphi-Quellcode:
Webbrowser1.OleObject.Document.All.Item('Hier_FeldName_einsetzen').Focus;
|
Re: SetFocus in Webbrowser ?
Danke Toms
Zitat:
gruß |
Alle Zeitangaben in WEZ +1. Es ist jetzt 01:02 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz