Bug 98904 - how about a SimpleHtmlStyledText widget
Summary: how about a SimpleHtmlStyledText widget
Status: RESOLVED DUPLICATE of bug 212829
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.1   Edit
Hardware: All Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-08 06:10 EDT by Sébastien Gandon CLA
Modified: 2007-12-19 04:26 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sébastien Gandon CLA 2005-06-08 06:10:28 EDT
Hello,

I am very frustrated as I do not find any widget that would fill my need easilly.
Like in swing components, I would like to be able to set a text to a widget with
custom tags (could be simple html) that would describe the way the text is rendered.
Say a SimpleHtmlStyledText.setText("this is <b>bold</b>"); would display the
bold word in bold.
I am sure this would help people a lot. Because this would separate the look
from the code as text and format would be embedded in the internationalization
.properties files.

Thank for looking at this enhancement.

SeB.
Comment 1 Veronika Irvine CLA 2005-06-08 09:32:26 EDT
The Browser widget supports html tags (plus style sheets etc).  Are you 
looking for something else?

See:

http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclip
se/swt/snippets/Snippet136.java?rev=HEAD&content-type=text/vnd.viewcvs-markup
Comment 2 Sébastien Gandon CLA 2005-06-08 10:33:01 EDT
Hi,

Ok this would do the trick although I need to change some browser properties to
make it look like a Label widget, but isn't that a bit heavy to instanciate a
full html browser to display a label with some styled text in it?
If you think not then close this bug.

Thanx anyway for your answer.
Comment 3 Sébastien Gandon CLA 2005-06-08 10:52:07 EDT
I must comme back to my previous comments, I just looked at the implementation
of Browser and correct me if I am wrong but it seems to be instanciating
internet explorer !!!! 
As I said I need something light to display styled labels not an OLE Internet
Explorer instance for each styled label I need to display.
This seems such an over head for a small requirment?
There should be some light weight widgets providing small htlp subset of tabs
that would look the same on all platforms.
Because I am not sure my html label (using Browser) will look the same on every
platform.
Please open a new requirement for this feature.
Comment 4 Felipe Heidrich CLA 2005-08-12 14:44:52 EDT
If you only cares about window it is probably worth to check this work:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=54426#c14
(I never tested it myself, but it seems to be what you want).

Why can you use StyledText to render the information you need ? What feature 
is missing ? multiple font, indentation, bullets list, embed objects, ...
Comment 5 Sébastien Gandon CLA 2005-08-16 05:52:33 EDT
This is not exactly what I would expect, let me be more precise.
I just need an simple HTML renderer component, not as heavy as a plateform
dependent html browser and not as complex as an html editor.
Let's imagine you have some internationnal text in .properties file that embed
formating in html format. 
It is nice to have the formating with the text itself and not in the java code.
That is why I would have liked a lightweight component to display my text with
some basic formating functionnalities.
I would imagine an implementation of the StyledText with an integrated parsing
of simple html tags.
Comment 6 Steve Northover CLA 2007-12-17 14:32:24 EST

*** This bug has been marked as a duplicate of bug 212829 ***
Comment 7 Sébastien Gandon CLA 2007-12-19 04:26:19 EST
I do not know why this bug has been marked as duplicate of the bug 212829?

An HTML editor is different from a light basic html rendering component supporting a few html tags as bold, italic, color and may be font.

This component would offer the same look whatever the platerform instead of rendering html through the OS browser.

I suggest you re-open this bug.
Please.

SeB.