Skip to main content



      Home
Home » Newcomers » Newcomers » button with label and text
button with label and text [message #27528] Sun, 13 February 2005 21:22 Go to next message
Eclipse UserFriend
Originally posted by: elban.DEL.IT.SPAM.box43.pl

Anyone knows how to display BOTH text and image on push button?

I tried like this

Button addUser = new Button(parent, SWT.PUSH);
addUser.setLayoutData(...);
Image i = new Image(parent.getDisplay(),
D:\\some\\path\\toolbar_newfolder.gif");
addUser.setImage(i);
addUser.setText("Some text");

and I always see ONLY "Some text" on the button, no image.
After replacing two last lines


addUser.setText("Some text");
addUser.setImage(i);

I get no text, but image.

What's wrong?

M.
Re: button with label and text [message #27554 is a reply to message #27528] Mon, 14 February 2005 09:26 Go to previous message
Eclipse UserFriend
Originally posted by: myersj.gmail.com

Marcin,

This is currently not possible in SWT. See bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=33967

Sorry,

- Jeff

Marcin Makowski wrote:
> Anyone knows how to display BOTH text and image on push button?
>
> I tried like this
>
> Button addUser = new Button(parent, SWT.PUSH);
> addUser.setLayoutData(...);
> Image i = new Image(parent.getDisplay(),
> D:\\some\\path\\toolbar_newfolder.gif");
> addUser.setImage(i);
> addUser.setText("Some text");
>
> and I always see ONLY "Some text" on the button, no image.
> After replacing two last lines
>
>
> addUser.setText("Some text");
> addUser.setImage(i);
>
> I get no text, but image.
>
> What's wrong?
>
> M.
Previous Topic:A lot of windows in Gnome
Next Topic:Eclipse Compilation Options
Goto Forum:
  


Current Time: Sun Oct 26 12:21:50 EDT 2025

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

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

Back to the top