SWT button [message #465124] |
Tue, 06 December 2005 13:33 |
Eclipse User |
|
|
|
Originally posted by: zveber.zelnet.ru
I'm creating swt button and call methods setText() and setImage(), but
don't see both image and text on button. Using Eclipse 3.2M2
|
|
|
|
|
Re: SWT button [message #465140 is a reply to message #465136] |
Tue, 06 December 2005 17:06 |
Eclipse User |
|
|
|
Originally posted by: mwilli.iastate.edu
Alternatively, you could use javaw.exe to launch the program, this seems
to work fine on windows xp, without a manifest file.
Veronika Irvine wrote:
> On Windows XP you need to have a manifest to see both. Earlier versions of
> Windows do not support both text and image - in those cases, the last method
> you call is what will be shown.
>
> See:
> http://eclipse.org/swt/faq.php#xpthemes
>
> For all other platforms, you should see both.
>
> "Zveber" <zveber@zelnet.ru> wrote in message
> news:1ce7e577df270836515296a0532355d1$1@www.eclipse.org...
>> I'm creating swt button and call methods setText() and setImage(), but
>> don't see both image and text on button. Using Eclipse 3.2M2
>>
>
>
|
|
|
|
|
Re: SWT button [message #465364 is a reply to message #465208] |
Sat, 10 December 2005 13:08 |
Eclipse User |
|
|
|
Originally posted by: zveber.zelnet.ru
Sorry, I have make mistake... I'm using 3.2M3 =).
По-рус& ;#1089;ки...
Черто& #1074;а
кнопк& #1072;
нифиг& #1072; не
рисуе& #1090;ся с
карти& #1085;кой)).
|
|
|
Re: SWT button [message #465605 is a reply to message #465124] |
Thu, 15 December 2005 19:00 |
Page Mising name Messages: 31 Registered: July 2009 |
Member |
|
|
Hi,
I am having the same problem. The button only should either the image or
the text, whichever is set later.
I am using Win2000, JDK1.5, really appreciate your help to get this
resolved.
Here is the code:
Button gettingStarted = new Button(parent, SWT.PUSH | SWT.LEFT);
gettingStarted.setText(r.getString("gettingStarted"));
//TODO: backgroup color cannot be set for PUSH style button.
//gettingStarted.setBackground(new Color(null, 0, 0, 255));
//TODO: cannot set image and text for button at same time.
gettingStarted.setImage(new Image(null,
"D:\\temp\\homefolder_16.png"));
Thanks.
Page
|
|
|
Re: SWT button [message #465607 is a reply to message #465605] |
Thu, 15 December 2005 19:07 |
Veronika Irvine Messages: 1272 Registered: July 2009 |
Senior Member |
|
|
The native button on Windows 2000 does not support both text and an image at
the same time. The expected behaviour is that whatever API is called last
(setImage() or setText()) wins.
You need Windows XP with a manifest to see both the image and text at the
same time on Windows.
http://eclipse.org/swt/faq.php#xpthemes
"Page" <pagew2000@yahoo.com> wrote in message
news:f012436b7b9e17db3dadc3a35751489b$1@www.eclipse.org...
> Hi,
>
> I am having the same problem. The button only should either the image or
> the text, whichever is set later.
>
> I am using Win2000, JDK1.5, really appreciate your help to get this
> resolved.
>
> Here is the code:
>
> Button gettingStarted = new Button(parent, SWT.PUSH | SWT.LEFT);
> gettingStarted.setText(r.getString("gettingStarted"));
> //TODO: backgroup color cannot be set for PUSH style button.
> //gettingStarted.setBackground(new Color(null, 0, 0, 255));
> //TODO: cannot set image and text for button at same time.
> gettingStarted.setImage(new Image(null,
> "D:\\temp\\homefolder_16.png"));
>
>
> Thanks.
> Page
>
|
|
|
Powered by
FUDForum. Page generated in 0.04229 seconds