Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » WordPad in SWT application
WordPad in SWT application [message #544595] Sun, 04 July 2010 16:37 Go to next message
Jacek  is currently offline Jacek Friend
Messages: 4
Registered: April 2010
Junior Member
Hi,

I write a editor for templates. The templates are persisted in a database. Format of the templates is rtf. The look of the application: on the left a view with a list of templates, in the middle a editor, on the right (or bottom) a view with a list of placeholders (like ${var}).

The application will run only on Windows, so I want to use Wordpad as editor. I have some questions:

1. How should I embed the Wordpad: with OleClientSite, or OleControlSite?
2. How can I control which toolbars of Wordpad are available and shown in my application?
3. How can I "inject" a placeholder (after doubleclick on row in view with placeholders) in a current position of the cursor in the editor?
4. How can I load and save content of the editor in form of byte[] instead of a file?

Regards,
Jacek
Re: WordPad in SWT application [message #544732 is a reply to message #544595] Mon, 05 July 2010 11:45 Go to previous message
Roland Tepp is currently offline Roland TeppFriend
Messages: 336
Registered: July 2009
Senior Member
Hi Jacek,

We've actually had quite a similar problem, that we solved initially by
embedding RichText COM widget, but that turned out to be somewhat messy
distribution wise (you will need to redistribute the VB custom control,
and handle all the registration and cleanup of the weidget in
install/uninstall of the product).

Also we did not have good enough control over the embedded COM widget
(e.g. widget borders, scrollbars and their position and other aspects
that were out of our reach when using OLE).

We ended up writing thin JNI layer to calling platform's native RichEdit
MFC widget directly from java.

This allowed us to gain fairly solid control over the RichEdit widget
(or rather aspects of te widget that we cared about) and removed the
nightmare of managing the redistribution of the VB OLE control library.

4.07.2010 19:37, Jacek kirjutas:
> Hi,
>
> I write a editor for templates. The templates are persisted in a
> database. Format of the templates is rtf. The look of the application:
> on the left a view with a list of templates, in the middle a editor, on
> the right (or bottom) a view with a list of placeholders (like ${var}).
>
> The application will run only on Windows, so I want to use Wordpad as
> editor. I have some questions:
>
> 1. How should I embed the Wordpad: with OleClientSite, or OleControlSite?
> 2. How can I control which toolbars of Wordpad are available and shown
> in my application?
> 3. How can I "inject" a placeholder (after doubleclick on row in view
> with placeholders) in a current position of the cursor in the editor?
> 4. How can I load and save content of the editor in form of byte[]
> instead of a file?
>
> Regards,
> Jacek


--
Roland Tepp
Previous Topic:Setting a child of SashForm to a desired size
Next Topic:Re: Transparent FormText
Goto Forum:
  


Current Time: Thu Apr 25 00:18:36 GMT 2024

Powered by FUDForum. Page generated in 0.03041 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top