Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Text alignment in ToolItem button with Image
Text alignment in ToolItem button with Image [message #437503] Sun, 06 June 2004 16:15 Go to next message
a is currently offline aFriend
Messages: 75
Registered: July 2009
Member
How to set the alignment of text in a ToolItem button with image? The text
is always placed below the image, but I want to have the alignment on the
right hand side, just like a button in Internet Explorer toolbar. Thanks!
Re: Text alignment in ToolItem button with Image [message #437533 is a reply to message #437503] Mon, 07 June 2004 09:42 Go to previous messageGo to next message
Robert Bacs is currently offline Robert BacsFriend
Messages: 165
Registered: July 2009
Senior Member
Hi,

Try to use SWT.RIGHT style.

Boby
"Antony NG" <a@a.com> wrote in message news:c9vff3$ala$1@eclipse.org...
> How to set the alignment of text in a ToolItem button with image? The text
> is always placed below the image, but I want to have the alignment on the
> right hand side, just like a button in Internet Explorer toolbar. Thanks!
>
>
Re: Text alignment in ToolItem button with Image [message #437566 is a reply to message #437533] Mon, 07 June 2004 15:16 Go to previous messageGo to next message
a is currently offline aFriend
Messages: 75
Registered: July 2009
Member
Thx. I have tried but it doesn't work. I created a toggle button "Folder"
using the statement below:

ToolItem btnFolder = new ToolItem(tbStandard, SWT.CHECK | SWT.RIGHT);

It still place the text below the image.

"Robert Bacs" <boby@zerosoft.ro>
Re: Text alignment in ToolItem button with Image [message #437595 is a reply to message #437566] Tue, 08 June 2004 16:52 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Use SWT.RIGHT on the tool bar.

"Antony NG" <a@a.com> wrote in message news:ca20cu$vm$1@eclipse.org...
> Thx. I have tried but it doesn't work. I created a toggle button "Folder"
> using the statement below:
>
> ToolItem btnFolder = new ToolItem(tbStandard, SWT.CHECK | SWT.RIGHT);
>
> It still place the text below the image.
>
> "Robert Bacs" <boby@zerosoft.ro>
Re: Text alignment in ToolItem button with Image [message #437649 is a reply to message #437595] Wed, 09 June 2004 12:58 Go to previous message
a is currently offline aFriend
Messages: 75
Registered: July 2009
Member
Great, it works! Thanks very much.

"Steve Northover" <steve_northover@ca.ibm.com>
Previous Topic:SWT Thread problem under Linux (GTK)
Next Topic:Linux - ToolBar Buttons using keyboard
Goto Forum:
  


Current Time: Fri Sep 20 14:47:40 GMT 2024

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

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

Back to the top