[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: RichText in SWT?

In article <csjjdd$dfb$1@xxxxxxxxxxxxxxx>, freddie_nurke@xxxxxxxxxxx 
says...
> Hi folks,
> 
> I'm trying to dig up a rich text editor I can use in Eclipse.  Ideally, 
> such a control would wrap or implement similar functionality to the 
> Windows RichText control: multiple fonts and formatting in a single line 
> of text, word wrapping, right-to-left text, alignment, etc.
> 
> SWT's StyledText provides fairly basic functionality and misses many of 
> these features.  The JFace TextViewer seems to be only a wrapper for a 
> StyledText, so as best as I can tell it has the same restrictions. 
> Swing's JTextComponent seems to do what I need but would require the 
> swing/swt bridge, which I'd rather not rely on.
> 
> On the Eclipse website I found a bug report on this topic (#54426, 
> "Implement RichText editor for SWT").  One of the posters there has 
> worked on modifications to the StyledText, but they appear to be buggy 
> and incomplete.  I'm in the process of evaluating that solution.
> 
> Does anyone know of an appropriate control for rich text editing in SWT, 
> or a reasonable alternative?
> 
> Thanks,
> 
> Fred
> 

Not sure why the concern with the SWT_AWT bridge.  Very stable and works 
more than reasonably well to embed a JTextPane (preferable to a 
TextComponent).  And, the complications of mixing SWT and Swing are 
actually quite minor, in practice.  In the absence of a mature SWT 
widget, not a bad alternative.