ComboBoxCellEditor dans un tableViewer
Hello,
Je cherche a placé un ComboBoxCellEditor dans un table viewer mais je n'y arrive pas, un simple CellEditor est afficher au resultat.
Voici mon code de création du combo :
Code:
1 2 3 4 5 6 7 8 9 10
|
MessageCategory [] messageCategories = MessageCategory.values();
String[] convertedCategories = new String[messageCategories.length];
for (int i = 0; i < messageCategories.length;i++) {
MessageCategory messageCategory = messageCategories[i];
convertedCategories[i] = messageCategory.getName();
}
ComboBoxCellEditor categoryEditor = new ComboBoxCellEditor(table, convertedCategories, SWT.READ_ONLY);
tableViewer.setCellEditors(new CellEditor[]{keyEditor, categoryEditor, null, valueEditor}); |
et voici le resultat obtenu (voir capture d écran)