Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » icons in texteditor
icons in texteditor [message #453938] Thu, 14 April 2005 12:21 Go to next message
Philipp is currently offline PhilippFriend
Messages: 49
Registered: July 2009
Member
I was wondering if there is a possibility to have icons (or little images)
displayed in a texteditor (like icq and other tools do with smileys in the
text :-) ). If so can someone please point me to some resources ? Thx in
advance.

regards,
- philipp
Re: icons in texteditor [message #454102 is a reply to message #453938] Sun, 17 April 2005 19:03 Go to previous messageGo to next message
Daniel Spiewak is currently offline Daniel SpiewakFriend
Messages: 263
Registered: July 2009
Senior Member
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="serif">The only thing I can think of, and I know this is
the sixth or seventh time I've suggested this to someone on this group,
is to create a custom subclass of TextEditor.</font><br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:philipp_tiedt@de.ibm.com">philipp_tiedt@de.ibm.com</a> wrote:
<blockquote cite="midd3ln7c$96t$1@news.eclipse.org" type="cite">
<pre wrap="">I was wondering if there is a possibility to have icons (or little images)
displayed in a texteditor (like icq and other tools do with smileys in the
text :-) ). If so can someone please point me to some resources ? Thx in
advance.

regards,
- philipp
</pre>
</blockquote>
</body>
</html>
Re: icons in texteditor [message #454166 is a reply to message #454102] Mon, 18 April 2005 17:18 Go to previous message
Eclipse UserFriend
Originally posted by: bob.objfac.com

That's maybe too broad a suggestion to be useful. ;-}

Unless there is a ready-made plugin I don't know about...

SWT doesn't provide an editable widget that allows you to intersperse
images and text. (The Browser widget isn't editable; the RTF widget is
pie in the sky.) If you want to do it by a hack and you don't flow text
and no image height is greater than the row height, you could put
placeholder whitespace in the text and draw the images in a paint
listener. A similiar technique (except for the extra whitespace) is used
to draw the squiggles and boxes you see in the Java editor. (Flowing is
a problem because StyledText doesn't support non-breaking spaces.)

Anything much better than that, you'd really have to want it to do the
work required.

Bob Foster

Daniel Spiewak wrote:
> The only thing I can think of, and I know this is the sixth or seventh
> time I've suggested this to someone on this group, is to create a custom
> subclass of TextEditor.
>
> philipp_tiedt@de.ibm.com wrote:
>
>>I was wondering if there is a possibility to have icons (or little images)
>>displayed in a texteditor (like icq and other tools do with smileys in the
>>text :-) ). If so can someone please point me to some resources ? Thx in
>>advance.
>>
>>regards,
>>- philipp
>>
>>
Previous Topic:Problem of TableCursor and Multi-selection
Next Topic:How can I disable some TabItems in a TabFolder?
Goto Forum:
  


Current Time: Wed Mar 03 03:35:36 GMT 2021

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

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

Back to the top