Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Using several TWebBrowser's to display html formated text: good practice or not?

Posted on 2006-10-30
4
Medium Priority
?
158 Views
Last Modified: 2010-04-05
I'm considering asking a programmer to create a delphi component based on internet explorer's TWebBrowser to easily display text by passing the html code directly to the component.

Will it consume a lot of resources or memory to display if I use a few of these components (say 6) on a single form to display basic html code?

The OS's will be Windows 2000, XP, 2003 and Vista.

Thanks!

Steven
0
Comment
Question by:smartins
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 10

Expert Comment

by:wildzero
ID: 17838212
How do you mean?

Like get the TWebbrowser togo a website, grab the HTML then strip the HTML and just return the text?
If so, that is very easily done.
0
 
LVL 10

Expert Comment

by:wildzero
ID: 17838218
Infact, I would rather use something like Indy to grab the website HTML as you can trab errors better and also wont have to wait for images to load.... but thats if we are on the same road here ;-)
0
 

Author Comment

by:smartins
ID: 17838563
No, use TWebbrowser to display html text locally. Can be from a simple text with bold, links and other formating to a more complex page with images and tables.

But nothing to grab from the internet, all html code would be already included or generated by the application. The TWebbrowser would serve to display it.
0
 
LVL 10

Accepted Solution

by:
wildzero earned 400 total points
ID: 17838573
ah ok, so something like

var
  sl : TStringlist;
begin
  sl := TStringlist.create;
  sl.add('<html>');
  sl.add('<head>');
  sl.add('<title>hi</title>');
  sl.add('</head>');
  sl.add('<body>');
  sl.add('Text');
  sl.add('</body>');
  sl.add('</html>');
  sl.savetofile('C:\file.html');

  webbrowser1.navigate('c:\file.html');
  sl.free;
end;

would do it.
and sure u could have 6 doing that.
I use 1 or 2 often.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question