Reputation: 144
I am creating a dialog by extending org.eclipse.ui.dialogs.ListSelectionDialog
While overriding createDialogArea(Composite parent)
if I call super.createDialogArea(parent)
and create 3 columns in the table viewer,
the columnCount of org.eclipse.swt.widgets.Table
is set to 1
by default.
Hence, the labelprovider's getText()
is called only for column with index 0
and I don't get text in other 2 columns.
How can I create/add multiple columns in createDialogArea(Composite parent)
so that it works correctly?
Upvotes: 2
Views: 916
Reputation: 3621
Underlying table in ListSelectionDialog
uses TableLayout
and by default it is configured to span the first (and only) column to 100% of the table width. So, you you add more columns, you also need to configure the layout using addColumnData(ColumnLayoutData data)
method.
Upvotes: 1