|
OnTitleChange :Write an OnTitleChange event handler to respond when the browser obtains
information about the document title. Because the title can change while an HTML
page is downloading, LocationName is originally set to the URL of the
document. After the title specified in the HTML page, if any, becomes available,
LocationName is changed to reflect the actual
title
procedure YourForm.WebBrowser_OnTitleChange(
Sender: TObject;
const Text: WideString);
Command Arguments:
Sender
- The TWebBrowser component for which the event is being generated. Usage:
(Sender as TWebBrowser)
Text
- New title bar text.
procedure TbrowserFrm.WB1TitleChange(Sender: TObject; const Text: WideString);
begin
StatusBar1.Panels[2].Caption:= Text;
StatusBar1.Panels[2].Hint:= ('Web Site Name: '+ EmbeddedWB1.LocationName);
frmMain.Caption := ('Web Site Name: '+ EmbeddedWB1.LocationName)+' '+AppName;
end;
|