• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 159
  • Last Modified:

Load TStrings to TWebBrowser window

I need to have a webbrowser to display contents of a TMemo. What I did is to save the content to a file and then load the file to the TWebBrowser. Is there any way that I can bypass this and directly view the contents without saving-loading? Thanks
0
xiangenhu
Asked:
xiangenhu
1 Solution
 
trestoCommented:
First, if your WebBrowser is empty, you need to do

WebBrowser1.Navigate('about:blank');

Then you go with

OleVariant(WebBrowser1.Document).Write(Memo1.Lines.Text);
0
 
xiangenhuAuthor Commented:
It works!
WebBrowser1.Navigate('about:blank');

better be WebBrowser1.Navigate('about:blank',flag,temp,temp,temp);

where flag, temp are  OleVariant
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now