Skip to main content



      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 12:15 Go to next message
Eclipse UserFriend
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 05:42 Go to previous messageGo to next message
Eclipse UserFriend
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 11:16 Go to previous messageGo to next message
Eclipse UserFriend
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 12:52 Go to previous messageGo to next message
Eclipse UserFriend
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 08:58 Go to previous message
Eclipse UserFriend
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 Jul 04 15:31:59 EDT 2025

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

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

Back to the top