diff --git a/examples/helloworld/src/helloworld.d b/examples/helloworld/src/helloworld.d index b80631ec..365d2855 100644 --- a/examples/helloworld/src/helloworld.d +++ b/examples/helloworld/src/helloworld.d @@ -46,6 +46,7 @@ extern (C) int UIAppMain(string[] args) { layoutWidth: fill CheckBox { id: cb1; text: "checkbox 1" } CheckBox { id: cb2; text: "checkbox 2" } + ComboEdit { id: ce1; text: "some text"; } } } HorizontalLayout { diff --git a/src/dlangui/widgets/combobox.d b/src/dlangui/widgets/combobox.d index dff9d729..6bbee3c2 100644 --- a/src/dlangui/widgets/combobox.d +++ b/src/dlangui/widgets/combobox.d @@ -474,11 +474,15 @@ class ComboEdit : ComboBox { return this; } + /// set bool property value, for ML loaders + mixin(generatePropertySettersMethodOverride("setBoolProperty", "bool", + "readOnly")); + override protected Widget createSelectedItemWidget() { EditLine res = new EditLine("COMBOBOX_BODY"); res.layoutWidth = FILL_PARENT; res.layoutHeight = WRAP_CONTENT; - res.readOnly = true; + res.readOnly = false; _edit = res; return res; }