Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Image and Text in SWT Button
Image and Text in SWT Button [message #451341] Mon, 28 February 2005 00:00 Go to next message
Eclipse UserFriend
Originally posted by: shaffin.email.uophx.edu

This is a multi-part message in MIME format.

------=_NextPart_000_014C_01C51CFE.9F4E8000
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello All,

Can someone please share some code how to show a text and image in a SWT =
Button. I am new to SWT and have a toggle button in which I would like =
to show an image and text.

Thank you all,
Shaffin.

------=_NextPart_000_014C_01C51CFE.9F4E8000
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2180" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Hello All,</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Can someone please share some code how to show a =
text and=20
image in a SWT Button. I am new to SWT and have a toggle button in which =
I would=20
like to show an image and text.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Thank you all,</FONT></DIV>
<DIV><FONT size=3D2>Shaffin.</FONT></DIV>
<DIV>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_014C_01C51CFE.9F4E8000--
Re: Image and Text in SWT Button [message #451342 is a reply to message #451341] Mon, 28 February 2005 00:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: shaffin.email.uophx.edu

This is a multi-part message in MIME format.

------=_NextPart_000_0157_01C51CFE.D41BF4C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I forgot to mention that I would like the font size to be 16 rather than =
the default.


"SHAFFIN BHANJI" <shaffin@email.uophx.edu> wrote in message =
news:cvtmv7$d91$1@www.eclipse.org...
Hello All,

Can someone please share some code how to show a text and image in a =
SWT Button. I am new to SWT and have a toggle button in which I would =
like to show an image and text.

Thank you all,
Shaffin.

------=_NextPart_000_0157_01C51CFE.D41BF4C0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2180" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>I forgot to mention that I would like the font size =
to be 16=20
rather than the default.</FONT></DIV>
<DIV><FONT size=3D2></FONT><BR>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"SHAFFIN BHANJI" &lt;<A=20
=
href=3D"mailto:shaffin@email.uophx.edu">shaffin@email.uophx.edu</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:cvtmv7$d91$1@www.eclipse.org">news:cvtmv7$d91$1@www.eclipse.=
org</A>...</DIV>
<DIV><FONT size=3D2>Hello All,</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Can someone please share some code how to show a =
text and=20
image in a SWT Button. I am new to SWT and have a toggle button in =
which I=20
would like to show an image and text.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Thank you all,</FONT></DIV>
<DIV><FONT size=3D2>Shaffin.</FONT></DIV>
<DIV>&nbsp;</DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0157_01C51CFE.D41BF4C0--
Re: Image and Text in SWT Button [message #451382 is a reply to message #451342] Mon, 28 February 2005 19:33 Go to previous message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.

------=_NextPart_000_0365_01C51DA2.794E9DF0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

The SWT Button can only show either text or a button. A ToolItem in a =
ToolBar, however, can show both at the same time.

See:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=3D33967

The font on a button can be set with Button.setFont(Font)

"SHAFFIN BHANJI" <shaffin@email.uophx.edu> wrote in message =
news:cvtn1v$do0$1@www.eclipse.org...
I forgot to mention that I would like the font size to be 16 rather =
than the default.

=20
"SHAFFIN BHANJI" <shaffin@email.uophx.edu> wrote in message =
news:cvtmv7$d91$1@www.eclipse.org...
Hello All,

Can someone please share some code how to show a text and image in a =
SWT Button. I am new to SWT and have a toggle button in which I would =
like to show an image and text.

Thank you all,
Shaffin.

------=_NextPart_000_0365_01C51DA2.794E9DF0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2604" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>The SWT Button can only show either text or a =
button.&nbsp; A=20
ToolItem in a ToolBar, however, can show both at the same =
time.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>See:</FONT></DIV>
<DIV><FONT size=3D2><A=20
href=3D"https://bugs.eclipse.org/bugs/show_bug.cgi?id=3D33967">https://bu=
gs.eclipse.org/bugs/show_bug.cgi?id=3D33967</A></FONT></DIV >
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>The font on a button can be set with=20
Button.setFont(Font)</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"SHAFFIN BHANJI" &lt;<A=20
=
href=3D"mailto:shaffin@email.uophx.edu">shaffin@email.uophx.edu</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:cvtn1v$do0$1@www.eclipse.org">news:cvtn1v$do0$1@www.eclipse.=
org</A>...</DIV>
<DIV><FONT size=3D2>I forgot to mention that I would like the font =
size to be 16=20
rather than the default.</FONT></DIV>
<DIV><FONT size=3D2></FONT><BR>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"SHAFFIN BHANJI" &lt;<A=20
=
href=3D"mailto:shaffin@email.uophx.edu">shaffin@email.uophx.edu</A>&gt; =
wrote=20
in message <A=20
=
href=3D"news:cvtmv7$d91$1@www.eclipse.org">news:cvtmv7$d91$1@www.eclipse.=
org</A>...</DIV>
<DIV><FONT size=3D2>Hello All,</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Can someone please share some code how to show a =
text and=20
image in a SWT Button. I am new to SWT and have a toggle button in =
which I=20
would like to show an image and text.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Thank you all,</FONT></DIV>
<DIV><FONT size=3D2>Shaffin.</FONT></DIV>
<DIV><FONT =
size=3D2></FONT>&nbsp;</DIV></BLOCKQUOTE></BLOCKQUOTE ></BODY></HTML>

------=_NextPart_000_0365_01C51DA2.794E9DF0--
Previous Topic:No images in ComboViewer?
Next Topic:Layout: align buttons vertical - center
Goto Forum:
  


Current Time: Mon Oct 26 16:44:21 GMT 2020

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

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

Back to the top