Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » StyledText with Image?
StyledText with Image? [message #757231] Thu, 17 November 2011 09:23 Go to next message
Thomas Singer is currently offline Thomas SingerFriend
Messages: 75
Registered: July 2009
Member
We want to show some information in following form

+---------------------------------------------------------+
| Some text fjsdk fsdk fsdj fsd f sdfjs df  +------------+|
| Some text f sdk sdjf jfks dfsd fksjf ksl  |            ||
| Some text fjskdj fsdf sdfj sdfjs dlfs  f  |   image    ||
| Some text fkdsj fej rek dfjds fsdkf sd    |            ||
| Some text trejk jfdkvjfdivrvrm  kfgd      |            ||
| Some text rejkfvdsmvkddmvfd  kdjff dsf s  +------------+|
| Some text fjsdkjf sdkfj er ewjcekrjemwrwer fdsfdsfsdfew |
| Some safd sjfk jwejfijfie m cxdmcsdj ekdfkd  dkf dsjf   |
+---------------------------------------------------------+


Is it possible to show the image always at the right side and let the text flow around it? We don't want to use a Browser component for different reasons.
Re: StyledText with Image? [message #757254 is a reply to message #757231] Thu, 17 November 2011 11:05 Go to previous messageGo to next message
Thomas Singer is currently offline Thomas SingerFriend
Messages: 75
Registered: July 2009
Member
Belonging question: how to provide table-like right-aligned labels for left-aligned text:
+---------------------+
| First Name: Foo     |
|  Last Name: Bar     |
|     Street: Bazz    |
+---------------------+


Thanks in advance.
Re: StyledText with Image? [message #757785 is a reply to message #757254] Mon, 21 November 2011 16:33 Go to previous messageGo to next message
Felipe Heidrich is currently offline Felipe HeidrichFriend
Messages: 29
Registered: July 2009
Junior Member
Sorry Thomas, StyledText does not support the two scenarios you described.

Re: StyledText with Image? [message #757790 is a reply to message #757785] Mon, 21 November 2011 17:10 Go to previous messageGo to next message
Thomas Singer is currently offline Thomas SingerFriend
Messages: 75
Registered: July 2009
Member
Thanks for answering. The second question (label: value) is more important for us: we currently use a ScrolledComposite with Label and read-only input fields which has some flaws (hence we search an alternative). Do you have an idea what else we could use instead (beside using Browser and generate HTML)? Thanks in advance.

Tom
Re: StyledText with Image? [message #759098 is a reply to message #757790] Sat, 26 November 2011 11:13 Go to previous messageGo to next message
andzsinszan is currently offline andzsinszanFriend
Messages: 32
Registered: August 2011
Member
I am just curious what is your main reason for tying to avoid the browser widget? It seems to be a perfect match for your first scenario.
For the second, have you thought about tables? It's scrolled by default, aligned, and can be set editable.

Re: StyledText with Image? [message #759425 is a reply to message #759098] Mon, 28 November 2011 16:06 Go to previous messageGo to next message
Thomas Singer is currently offline Thomas SingerFriend
Messages: 75
Registered: July 2009
Member
andzsinszan wrote on Sat, 26 November 2011 06:13
I am just curious what is your main reason for tying to avoid the browser widget? It seems to be a perfect match for your first scenario.

Following reasons come to my mind:
- we want to exactly define which font should be used to provide a consistent GUI
- we've already god bug-reports where the browser did not work on Linux
- we prefer lower-level controls over heavy-weight ones (memory usage, flexibility)

Tom
Re: StyledText with Image? [message #760038 is a reply to message #759425] Thu, 01 December 2011 04:31 Go to previous message
andzsinszan is currently offline andzsinszanFriend
Messages: 32
Registered: August 2011
Member
Thanks.
You convinced me with the fonts.

Probably I'm not the best person here to give advice, but in my experience text renderer + canvas can work pretty nicely.
Provided the text doesn't need to be selected/copy-pasted etc.

gbr

Previous Topic:modifying ImageData on server ( headless mode)
Next Topic:masked value for swt text field based on indicator
Goto Forum:
  


Current Time: Sun Dec 21 09:16:57 GMT 2014

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

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