Solved

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

Posted on 2006-10-30
4
157 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 100 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month5 days, 16 hours left to enroll

626 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