| Код | function WB_DocumentLoaded(WB: TWebbrowser): Boolean; var iDoc: IHtmlDocument2; begin Result := False; if Assigned(WB) then begin if WB.Document <> nil then begin WB.ControlInterface.Document.QueryInterface(IHtmlDocument2, iDoc); Result := Assigned(iDoc); end; end; end;
procedure WB_ShowScrollBar (WB: TWebbrowser; Value: boolean); begin if WB_DocumentLoaded(WB) then if Assigned((WB.Document as IHTMLDocument2).body) then if Value then (WB.Document as IHTMLDocument2).body.style.overflow := 'hidden' else (WB.Document as IHTMLDocument2).body.style.overflow := ''; end;
// пример WB_ShowScrollBar(GetCurrentWB, true); // или CheckBox1.Checked
|
|