diff --git a/haxe/ui/core/BasicItemRenderer.hx b/haxe/ui/core/BasicItemRenderer.hx index deabe0e65..724b3a42a 100644 --- a/haxe/ui/core/BasicItemRenderer.hx +++ b/haxe/ui/core/BasicItemRenderer.hx @@ -1,9 +1,9 @@ package haxe.ui.core; -import haxe.ui.util.Color; import haxe.ui.components.Image; import haxe.ui.components.Label; import haxe.ui.containers.HBox; +import haxe.ui.util.Color; class BasicItemRenderer extends ItemRenderer { private var _icon:Image; @@ -34,6 +34,18 @@ class BasicItemRenderer extends ItemRenderer { private override function updateValues(value:Dynamic, fieldList:Array = null) { super.updateValues(value, fieldList); + if (_label.text != null) { + _label.show(); + } else { + _label.hide(); + } + + if (_icon.resource != null) { + _icon.show(); + } else { + _icon.hide(); + } + if (value != null) { if (value.color != null) { _label.customStyle.color = Color.fromString(value.color); diff --git a/haxe/ui/core/ItemRenderer.hx b/haxe/ui/core/ItemRenderer.hx index 40d1c91ac..e8cc40711 100644 --- a/haxe/ui/core/ItemRenderer.hx +++ b/haxe/ui/core/ItemRenderer.hx @@ -246,9 +246,9 @@ class ItemRenderer extends Box { setComponentProperty(c, v, property); } - c.show(); + //c.show(); } else if (c != null) { - c.hide(); + //c.hide(); } else if (f != "id" && f != "layout") { try { Reflect.setProperty(this, f, v);