fixes for ComboEdit

This commit is contained in:
Vadim Lopatin 2016-04-22 09:39:06 +03:00
parent 12e877ae4a
commit c1a48eea18
2 changed files with 6 additions and 1 deletions

View File

@ -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 {

View File

@ -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;
}