Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Image button with text
Image button with text [message #467750] Mon, 06 February 2006 01:42 Go to next message
Karl is currently offline KarlFriend
Messages: 92
Registered: July 2009
Member
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 06:06 Go to previous messageGo to next message
Konstantin Scheglov is currently offline Konstantin ScheglovFriend
Messages: 555
Registered: July 2009
Senior Member
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)


Konstantin Scheglov,
Google, Inc.
Re: Image button with text [message #467786 is a reply to message #467752] Mon, 06 February 2006 18:09 Go to previous message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
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: Fri Sep 20 03:33:13 GMT 2019

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

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

Back to the top