HELP with HTML in SWT? [message #467150] |
Wed, 25 January 2006 14:31  |
Eclipse User |
|
|
|
I have a canvas with a lot of user created objects and I'd like to add
text as well. In particular, I'd like to render HTML.
Since this is surely a common task in quite a few applications, I am
hoping there is a fairly straight forward way to take in an HTML file as a
string, and get the characters and the associated
style(font,bold,color,etc.) at each point in the document (in SWT). The
reason I prefer a method like this over StyledText is that I want to be
able to easily save the data and render it in a browser at some point down
the road. I also plan to do my own painting of the text since I require
transparency.
Thanks so much.
- Adam
|
|
|
|
Re: HELP with HTML in SWT? [message #467328 is a reply to message #467280] |
Sat, 28 January 2006 18:15  |
Eclipse User |
|
|
|
The full browser control works on all supported platforms with the exception of certain circumstances on Linux (Mozilla GRE is required to be referenced in GRE_PATH). Look up the SWT FAQ for more information. The major disadvantages for what it sounds like you're doing are a) slower load time since you have to load the entire GRE, and b) it looks like a separate StyledText widget and not like embedded HTML.
If you're doing simple HTML I actually recomend that you write your own renderer to render onto a Label using the new 3.2 styling features. There are a myriad of HTML parsers out there, take your pick.
|
|
|
Powered by
FUDForum. Page generated in 0.32624 seconds