Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Image button with text
Image button with text [message #467750] Sun, 05 February 2006 20:42 Go to next message
Eclipse UserFriend
Hi,all:
I want a button which display image and text together at the same time.I
try this with:
Button btnNewMail = new Button(shell, SWT.PUSH);
... ...
btnNewMail.setText("New Mail");
btnNewMail.setImage(newMail);

but it only display the image. Is there a method to display image and
text together within a button?

Regards,
Karl.
Re: Image button with text [message #467752 is a reply to message #467750] Mon, 06 February 2006 01:06 Go to previous messageGo to next message
Eclipse UserFriend
Karl write:

> I want a button which display image and text together at the same
> time.I try this with:
> Button btnNewMail = new Button(shell, SWT.PUSH);
> ... ...
> btnNewMail.setText("New Mail");
> btnNewMail.setImage(newMail);
>
> but it only display the image. Is there a method to display image and
> text together within a button?

Try in Eclipse 3.2 M4.

--
SY, Konstantin.
Advanced Eclipse SWT Designer (http://www.swt-designer.com)
Re: Image button with text [message #467786 is a reply to message #467752] Mon, 06 February 2006 13:09 Go to previous message
Eclipse UserFriend
In Eclipse 3.2 M4, on Windows XP you will also need a manifest file:

http://www.eclipse.org/swt/faq.php#xpthemes

"Konstantin Scheglov" <scheglov_ke@nlmk.ru> wrote in message
news:ds6p0j$aip$1@utils.eclipse.org...
> Karl write:
>
>> I want a button which display image and text together at the same time.I
>> try this with:
>> Button btnNewMail = new Button(shell, SWT.PUSH);
>> ... ...
>> btnNewMail.setText("New Mail");
>> btnNewMail.setImage(newMail);
>>
>> but it only display the image. Is there a method to display image and
>> text together within a button?
>
> Try in Eclipse 3.2 M4.
>
> --
> SY, Konstantin.
> Advanced Eclipse SWT Designer (http://www.swt-designer.com)
Previous Topic:browser widget program crash whenever i submit form
Next Topic:Several Images in one table cell
Goto Forum:
  


Current Time: Sat Jul 12 07:47:20 EDT 2025

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

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

Back to the top