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 74193 Details for
Bug 196692
[Forms] Section cannot handle most kinds of wrapping controls
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.
Example code to demonstrate problem 1
Problem1Test.java (text/x-java), 2.48 KB, created by
Stefan Xenos
on 2007-07-19 16:55:59 EDT
(
hide
)
Description:
Example code to demonstrate problem 1
Filename:
MIME Type:
Creator:
Stefan Xenos
Created:
2007-07-19 16:55:59 EDT
Size:
2.48 KB
patch
obsolete
> > >import org.eclipse.jface.layout.GridDataFactory; >import org.eclipse.jface.layout.GridLayoutFactory; >import org.eclipse.swt.SWT; >import org.eclipse.swt.widgets.Composite; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Label; >import org.eclipse.swt.widgets.Shell; >import org.eclipse.ui.forms.widgets.ExpandableComposite; >import org.eclipse.ui.forms.widgets.Section; > >public class Problem1Test { > > /** > * @param args > */ > public static void runTest() { > Shell shell = new Shell(Display.getCurrent(), SWT.DIALOG_TRIM | SWT.RESIZE); > > Section section1 = new Section(shell, ExpandableComposite.TWISTIE | ExpandableComposite.COMPACT | ExpandableComposite.EXPANDED); > { > Composite theComposite = new Composite(section1, SWT.NONE); > { > Label myLabel = new Label(theComposite, SWT.WRAP); > myLabel.setText("This is a test, it is only a test, so stop testing, or start testing, or something, or too many commas, don't know, more text!"); > > GridDataFactory.fillDefaults().grab(true, false).hint(50, SWT.DEFAULT).applyTo(myLabel); > > Label myLabel2 = new Label(theComposite, SWT.WRAP); > myLabel2.setText("This is a test, it is only a test, so stop testing"); > > GridDataFactory.fillDefaults().grab(true, false).hint(50, SWT.DEFAULT).applyTo(myLabel2); > > GridLayoutFactory.fillDefaults().equalWidth(true).numColumns(2).applyTo(theComposite); > } > section1.setClient(theComposite); > section1.setText("Section 1"); > } > GridDataFactory.fillDefaults().grab(true, false).applyTo(section1); > > Section section2 = new Section(shell, ExpandableComposite.TWISTIE | ExpandableComposite.COMPACT | ExpandableComposite.EXPANDED); > { > section2.setText("Section 2"); > > Label myLabel = new Label(section2, SWT.WRAP); > myLabel.setText("This is a test, it is only a test, so stop testing, or start testing, or something, or too many commas, don't know, more text!"); > > section2.setClient(myLabel); > //GridLayoutFactory.fillDefaults().generateLayout(section2); > } > GridDataFactory.fillDefaults().grab(true, false).applyTo(section2); > > GridLayoutFactory.fillDefaults().applyTo(shell); > > shell.pack(); > shell.open(); > } > >}
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 196692
:
73871
|
73877
| 74193 |
75257
|
268178
|
268216
|
268217
|
268234
|
268252
|
273142