Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате
Форум программистов > Delphi: Сети > Как перевести TWebBrowser в режим редактирования (дизайна)?


Автор: Poseidon 18.5.2005, 23:33
Код

  You can use the designMode property to put the Webbrowser 
  into a mode where you can edit the current document. 


uses 
  MSHTML_TLB; 

procedure TForm1.WebBrowser1DocumentComplete(Sender: TObject; 
  const pDisp: IDispatch; var URL: OleVariant); 
var 
  CurrentWB: IWebBrowser; 
begin 
  CurrentWB := pDisp as IWebBrowser; 
  (CurrentWB.Document as IHTMLDocument2).DesignMode := 'On'; 
end; 

procedure TForm1.Button1Click(Sender: TObject); 
begin 
  WebBrowser1.Navigate('http://wp.netscape.com/assist/net_sites/example1-F.html') 
end; 

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)