Community
Participate
Working Groups
If the ComboBoxCellEditor is instantiated without creating the control the items are not set on the ComboBoxCellEditor on call to createControl(Composite parent). The following snippet displays the problem. public class ComboEditor { void run() { Display display = new Display(); Shell shell = new Shell(display); String[] items = new String[]{"Item 1", "Item 2", "Item 3"}; ComboBoxCellEditor editor = new ComboBoxCellEditor(); editor.setItems(items); editor.create(shell); //Uncomment to set items. // editor.setItems(items); editor.activate(); editor.getControl().setVisible(true); editor.getControl().setBounds(0, 0, 100, 20); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } public static void main(String[] args) { new ComboEditor().run(); } }
Created attachment 41326 [details] My solution : I added populateComboBoxItems(); into createControl(Composite parent) Inside ComboBoxCellEditor class in createControl(Composite parent) method I added method to populate combobox items. Solution in attrachement.
Krzysztof, can you turn this into a patch so I can use the compare editor to see what's been chaged? Thanks.
Created attachment 41587 [details] My proposition I attach a patch file.
Krzysztof, just checked this on RC5 and it looks good...I'll mark as 3.3 and apply the patch once 3.2 goes out. Thanks
Fixed in >20060619.
Verified (visually) in I20080205-0010.