Trying to show a combobox in a gridview:
import Eto.Drawing as drawing import Eto.Forms as forms form = forms.Dialog() form.Title = "test combobox in gridview" form.ClientSize = drawing.Size(800, 600) form.Resizable = False comboMaterialType = forms.ComboBox(DataStore = ['Wood', 'Plastic'], SelectedIndex = 0) dataStoreRow1 = ['Surface 01: Front_Planes', comboMaterialType] dataStoreRow2 = ['Surface 02: Front_Edges', comboMaterialType] gridOption1 = forms.GridView() gridOption1.ShowHeader = False gridOption1.DataStore = (dataStoreRow1, dataStoreRow2) gridOption1.Columns.Add(forms.GridColumn(Editable = False, DataCell = forms.TextBoxCell(0))) gridOption1.Columns.Add(forms.GridColumn(Editable = True, DataCell = forms.ComboBoxCell(1))) layout = forms.DynamicLayout(DefaultSpacing = drawing.Size(5, 5), Padding = drawing.Padding(10)) layout.AddRow(gridOption1) form.Content = layout form.ShowModal()
The combobox is there but shows empty. You don’t see it immediately because the content is not shown.
When you click the combobox the first time (just behind the text), you have to click it a second time to see it’s a dropdown and a third time to actually see the dropdown list, which still shows empty:
What am I doing wrong?
PS: it’s a pity the documentation about Eto is so fragmented and in different languages. As I am not aquainted with C++ or C#, I can’t understand the code or translate it to Python …