Skip to main content



      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 05:49 Go to next message
Eclipse UserFriend
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 06:22 Go to previous messageGo to next message
Eclipse UserFriend
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 07:40 Go to previous messageGo to next message
Eclipse UserFriend
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 07:49 Go to previous message
Eclipse UserFriend
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: Tue Jul 08 03:04:41 EDT 2025

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

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

Back to the top