Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Label widget problem
Label widget problem [message #454626] Tue, 26 April 2005 07:04 Go to next message
Eclipse UserFriend
Originally posted by: neha_yadav.persistent.co.in

Hi All,

I am unable to assign both text and image to a Label. Only of them happens
depending upon what was set last. If I do a "setImage" after a "setText",
then only image shows and for vice versa, only text shows. Is this expected?
Can't a Label display an image succeeded by some text?

Thanks and Regards,
Neha.
Re: Label widget problem [message #454652 is a reply to message #454626] Tue, 26 April 2005 11:10 Go to previous messageGo to next message
Henrik Skovgaard is currently offline Henrik SkovgaardFriend
Messages: 84
Registered: July 2009
Member
"Neha Yadav" <neha_yadav@persistent.co.in> wrote in message
news:d4kpbb$kqr$1@news.eclipse.org...
> Hi All,
>
> I am unable to assign both text and image to a Label. Only of them happens
> depending upon what was set last. If I do a "setImage" after a "setText",
> then only image shows and for vice versa, only text shows. Is this
> expected?
> Can't a Label display an image succeeded by some text?

There is an example of how to build that kind of custom widget here:
http://www.eclipse.org/articles/Article-Writing%20Your%20Own %20Widget/Writing%20Your%20Own%20Widget.htm

/Henrik
Re: Label widget problem [message #454678 is a reply to message #454626] Wed, 27 April 2005 13:01 Go to previous message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
Label currently shows only an image or text. I looked for a feature request
to show both but could not find one (there is a request for Button - see Bug
33967 - but not for Label). You should enter one.

The custom widget org.eclipse.swt.custom.CLabel will show both an Image and
Text. Unfortunately, it does not support wrapping.

Alternatively, you could have two Labels and place them side by side.

"Neha Yadav" <neha_yadav@persistent.co.in> wrote in message
news:d4kpbb$kqr$1@news.eclipse.org...
> Hi All,
>
> I am unable to assign both text and image to a Label. Only of them happens
> depending upon what was set last. If I do a "setImage" after a "setText",
> then only image shows and for vice versa, only text shows. Is this
> expected?
> Can't a Label display an image succeeded by some text?
>
> Thanks and Regards,
> Neha.
>
>
Previous Topic:StyledText wrapped content
Next Topic:Howto: Display TabFolder items in multiple rows
Goto Forum:
  


Current Time: Sat Apr 20 02:42:29 GMT 2024

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

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

Back to the top