|
|
Re: How to put the toolbar text beside the image [message #457196 is a reply to message #457165] |
Mon, 20 June 2005 23:15 |
Damian Biollo Messages: 19 Registered: July 2009 |
Junior Member |
|
|
Thanks, SWT.RIGHT worked.
Although, it seemed to be needed in the constructor of the toolbar, rather
than the ToolItem constructor:
ToolBar toolbar = new ToolBar (parent, SWT.HORIZONTAL | SWT.FLAT |
SWT.RIGHT);
"Grant Gayed" <grant_gayed@ca.ibm.com> wrote in message
news:d96hfa$b83$1@news.eclipse.org...
> The closest you can get is to have your text appear to the right of your
> image. To do this create your ToolItems with style SWT.RIGHT.
>
> Grant
>
> "Damian" <damian_biollo@hotmail.com> wrote in message
> news:d8vgho$t92$1@news.eclipse.org...
> > Hi there,
> >
> > I have a toolbar with buttons, some of which have text, all of which
have
> > icons.
> > I would like the text to appear to the left of the image. By default the
> > text appears below the image.
> >
> > Is there any way to do this in SWT?
> >
> >
> > Here's some sample code of how I'm building the toolbar:
> >
> > ToolBar toolbar = new ToolBar (parent, SWT.HORIZONTAL |
SWT.FLAT);
> >
> > ToolItem button = new ToolItem (toolbar, SWT.NONE);
> > button.setText ("MyButton");
> > button.setToolTipText( "This is my button");
> > button.setImage (Images.getMyImage());
> >
> > GridData gridData = new GridData (GridData.FILL_HORIZONTAL);
> > toolbar.setLayoutData (gridData);
> >
> > Thanks
> > Damian
> >
> >
>
>
|
|
|
Re: How to put the toolbar text beside the image [message #457204 is a reply to message #457196] |
Tue, 21 June 2005 13:28 |
Grant Gayed Messages: 2150 Registered: July 2009 |
Senior Member |
|
|
Right, my mistake. It is applied to all items within a ToolBar, not
individual items.
"Damian" <damian_biollo@hotmail.com> wrote in message
news:d97ilo$kuk$1@news.eclipse.org...
> Thanks, SWT.RIGHT worked.
>
> Although, it seemed to be needed in the constructor of the toolbar, rather
> than the ToolItem constructor:
> ToolBar toolbar = new ToolBar (parent, SWT.HORIZONTAL | SWT.FLAT |
> SWT.RIGHT);
>
>
> "Grant Gayed" <grant_gayed@ca.ibm.com> wrote in message
> news:d96hfa$b83$1@news.eclipse.org...
> > The closest you can get is to have your text appear to the right of your
> > image. To do this create your ToolItems with style SWT.RIGHT.
> >
> > Grant
> >
> > "Damian" <damian_biollo@hotmail.com> wrote in message
> > news:d8vgho$t92$1@news.eclipse.org...
> > > Hi there,
> > >
> > > I have a toolbar with buttons, some of which have text, all of which
> have
> > > icons.
> > > I would like the text to appear to the left of the image. By default
the
> > > text appears below the image.
> > >
> > > Is there any way to do this in SWT?
> > >
> > >
> > > Here's some sample code of how I'm building the toolbar:
> > >
> > > ToolBar toolbar = new ToolBar (parent, SWT.HORIZONTAL |
> SWT.FLAT);
> > >
> > > ToolItem button = new ToolItem (toolbar, SWT.NONE);
> > > button.setText ("MyButton");
> > > button.setToolTipText( "This is my button");
> > > button.setImage (Images.getMyImage());
> > >
> > > GridData gridData = new GridData (GridData.FILL_HORIZONTAL);
> > > toolbar.setLayoutData (gridData);
> > >
> > > Thanks
> > > Damian
> > >
> > >
> >
> >
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03793 seconds