Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 267108 Details for
Bug 512716
Toolbar: item text has influence on other item's width
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
Code sample
ToolBarTest.java (text/plain), 1.24 KB, created by
Thomas Singer
on 2017-03-05 08:23:39 EST
(
hide
)
Description:
Code sample
Filename:
MIME Type:
Creator:
Thomas Singer
Created:
2017-03-05 08:23:39 EST
Size:
1.24 KB
patch
obsolete
>import org.eclipse.swt.*; >import org.eclipse.swt.graphics.*; >import org.eclipse.swt.layout.*; >import org.eclipse.swt.widgets.*; > >/** > * @author Thomas Singer > */ >public class ToolBarTest { > > private static final boolean LONGER_ITEM = true; > > public static void main(String[] args) { > final Display display = new Display(); > > final Shell shell = new Shell(display); > shell.setLayout(new GridLayout(1, false)); > > final ToolBar toolBar = new ToolBar(shell, SWT.FLAT | SWT.NO_FOCUS); > toolBar.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false)); > > createItem("Open", display.getSystemImage(SWT.ICON_INFORMATION), toolBar); > createItem("Save", display.getSystemImage(SWT.ICON_QUESTION), toolBar); > createItem(LONGER_ITEM ? "Longer Item" : "Long Item", display.getSystemImage(SWT.ICON_WARNING), toolBar); > > new Text(shell, SWT.BORDER | SWT.MULTI).setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); > > shell.setSize(400, 200); > shell.open(); > > while (!shell.isDisposed()) { > if (!display.readAndDispatch()) { > display.sleep(); > } > } > > display.dispose(); > } > > private static void createItem(String text, Image image, ToolBar toolBar) { > final ToolItem item = new ToolItem(toolBar, SWT.PUSH); > item.setText(text); > item.setImage(image); > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 512716
:
266995
|
266996
|
266997
| 267108