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 73871 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 the problem
SectionTest.java (text/x-java), 2.68 KB, created by
Stefan Xenos
on 2007-07-16 13:46:31 EDT
(
hide
)
Description:
Example code to demonstrate the problem
Filename:
MIME Type:
Creator:
Stefan Xenos
Created:
2007-07-16 13:46:31 EDT
Size:
2.68 KB
patch
obsolete
>/******************************************************************************* > * Licensed Materials - Property of IBM > * (c) Copyright IBM Corporation 2007. All Rights Reserved. > * > * Note to U.S. Government Users Restricted Rights: Use, > * duplication or disclosure restricted by GSA ADP Schedule > * Contract with IBM Corp. > *******************************************************************************/ >package com.ibm.team.filesystem.ui; > >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 SectionTest { > > /** > * @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!"); > > Label myLabel2 = new Label(theComposite, SWT.WRAP); > myLabel2.setText("This is a test, it is only a test, so stop testing"); > > GridLayoutFactory.fillDefaults().equalWidth(true).numColumns(2).generateLayout(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