I want a table that has a combo as one of its columnheaders. I already found out that it is impossible with Table from this question: Controls (Combo, Radio, Text) in column header SWT
Is there a way around that? I tried TableViewer but didn't find a way to do it with it either. Is there any way this can be achieved?
You could create your own column headers in a
Compositeabove the table using normal controls.You will then need to adjust the size of these controls to match the table column sizes. One way to do this is to use a table layout class extending the jface
TableColumnLayoutand overriding thesetColumnWidthsmethod which is called each time the column sizes change, so you can adjust your header control widths.Note: TableColumnLayout needs to be on a
Compositecontaining just theTablerather than directly on theTable.So something like this for the layout: