Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » line break in button text and image under button text
icon5.gif  line break in button text and image under button text [message #555315] Thu, 26 August 2010 09:49 Go to next message
Steffen Kay is currently offline Steffen KayFriend
Messages: 14
Registered: September 2009
Junior Member
Hi,
i want to add line breaks in a button text. The standard escape-sequences ("\n") does not work in this case. Is it not possible to add line breaks?
I set the text with the setText - function.

Addtionally i want to set an image under the button-text but i did not find any solutions for this problem. The picture is always before the button-text and in the same line.

Thanks in advance!
Re: line break in button text and image under button text [message #555329 is a reply to message #555315] Thu, 26 August 2010 10:22 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Steffen,

I'm sorry to say, but this is not possible in both SWT. As RAP (RWT) is
trying to be as close as possible to SWT, this is not possible in RAP
too. One possible workaround is to create a button with image only
(without text) and put the text in the image itself.

Best,
Ivan

On 08/26/2010 12:49 PM, Steffen wrote:
> Hi,
> i want to add line breaks in a button text. The standard
> escape-sequences ("\n") does not work in this case. Is it not possible
> to add line breaks?
> I set the text with the setText - function.
>
> Addtionally i want to set an image under the button-text but i did not
> find any solutions for this problem. The picture is always before the
> button-text and in the same line.
>
> Thanks in advance!
Re: line break in button text and image under button text [message #555340 is a reply to message #555329] Thu, 26 August 2010 11:40 Go to previous messageGo to next message
Steffen Kay is currently offline Steffen KayFriend
Messages: 14
Registered: September 2009
Junior Member
Ivan Furnadjiev wrote on Thu, 26 August 2010 06:22
Hi Steffen,

I'm sorry to say, but this is not possible in both SWT. As RAP (RWT) is
trying to be as close as possible to SWT, this is not possible in RAP
too. One possible workaround is to create a button with image only
(without text) and put the text in the image itself.

Best,
Ivan



Thank you for your reply.
Putting the text in the image itself produces the sideffect that you are no longer able to manage multi-language moreover every text change has to be made in the image.

Re: line break in button text and image under button text [message #555343 is a reply to message #555340] Thu, 26 August 2010 11:49 Go to previous message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Yes... this is true. Another solution will be to create a custom
widget (Button) with all the functionalities that you need.
See
http://help.eclipse.org/helios/topic/org.eclipse.rap.help/he lp/html/advanced/custom-widget.html

Best,
Ivan

On 08/26/2010 2:40 PM, Steffen wrote:
> Ivan Furnadjiev wrote on Thu, 26 August 2010 06:22
>> Hi Steffen,
>>
>> I'm sorry to say, but this is not possible in both SWT. As RAP (RWT)
>> is trying to be as close as possible to SWT, this is not possible in
>> RAP too. One possible workaround is to create a button with image
>> only (without text) and put the text in the image itself.
>>
>> Best,
>> Ivan
>
>
> Thank you for your reply. Putting the text in the image itself
> produces the sideffect that you are no longer able to manage
> multi-language moreover every text change has to be made in the image.
>
>
Previous Topic:The tableViewer select the wrong row when invoke tableViewer.remove(obj)
Next Topic:Custom widget question
Goto Forum:
  


Current Time: Mon Mar 04 12:59:57 GMT 2024

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

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

Back to the top