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 273024 Details for
Bug 531928
[GTK3] Table editing is broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Snippet with a table with Combo and Text as editors.
TableWithEditors.java (text/x-java), 2.01 KB, created by
Simeon Andreev
on 2018-03-07 10:32:13 EST
(
hide
)
Description:
Snippet with a table with Combo and Text as editors.
Filename:
MIME Type:
Creator:
Simeon Andreev
Created:
2018-03-07 10:32:13 EST
Size:
2.01 KB
patch
obsolete
>package swt.problems; > >import org.eclipse.swt.SWT; >import org.eclipse.swt.custom.TableEditor; >import org.eclipse.swt.layout.FillLayout; >import org.eclipse.swt.widgets.Combo; >import org.eclipse.swt.widgets.Composite; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Shell; >import org.eclipse.swt.widgets.Table; >import org.eclipse.swt.widgets.TableColumn; >import org.eclipse.swt.widgets.TableItem; >import org.eclipse.swt.widgets.Text; > >public class TableWithEditors { > > public static void main(String[] args) { > Display display = new Display(); > Shell shell = new Shell(display); > shell.setLayout(new FillLayout()); > shell.setSize(300, 200); > shell.setText("Table with Combo"); > > table(shell); > > shell.open(); > > while (!shell.isDisposed()) { > if (!display.readAndDispatch()) > display.sleep(); > } > display.dispose(); > } > > private static void table(Shell shell) { > Composite composite = new Composite(shell, SWT.NONE); > composite.setLayout(new FillLayout()); > > Table table = new Table(composite, SWT.BORDER); > TableColumn a = new TableColumn(table, SWT.NONE); > a.setText("column 1"); > a.setWidth(140); > TableColumn b = new TableColumn(table, SWT.NONE); > b.setText("column 2"); > b.setWidth(140); > TableColumn c = new TableColumn(table, SWT.NONE); > c.setText("column 2"); > c.setWidth(140); > > table.setHeaderVisible(true); > table.setLinesVisible(true); > > TableItem item1 = new TableItem(table, SWT.NONE); > item1.setText(new String[] { "combo11", "text12", "other13" }); > TableItem item2 = new TableItem(table, SWT.NONE); > item2.setText(new String[] { "other21", "other22", "other23" }); > > TableEditor comboEditor = new TableEditor(table); > Combo combo = new Combo(table, SWT.NONE); > combo.add("item 1"); > combo.add("item 2"); > comboEditor.grabHorizontal = true; > comboEditor.setEditor(combo, item1, 0); > > TableEditor textEditor = new TableEditor(table); > Text text = new Text(table, SWT.NONE); > text.setText("something"); > textEditor.grabHorizontal = true; > textEditor.setEditor(text, item1, 1); > } >}
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 531928
:
272975
|
272976
|
273020
|
273021
| 273024 |
273025
|
273066