ianharrigan / haxeui

IMPORTANT NOTE! This repository is no longer maintained. Please consider the newer version: https://github.com/haxeui/haxeui-core
http://haxeui.org/
392 stars 46 forks source link

Button does not show label after being nulled before #319

Open er453r opened 8 years ago

er453r commented 8 years ago

The problem lies here: https://github.com/ianharrigan/haxeui/blob/master/haxe/ui/toolkit/controls/Button.hx#L360

The solution is to add _label.visible = true; before organiseChildren();

ianharrigan commented 8 years ago

That seems strange, if you null (destroy) the label, then it should be recreated and when components are recreated they should start off as visible. Why are you nulling the label btw?

ianharrigan commented 8 years ago

Ah, sorry, i understand... You mean when you set the .text to null and then back to a value... gotcha... :)

er453r commented 8 years ago

Yes, I've meant nulling the text field, sorry for the confusion

ianharrigan commented 8 years ago

Should be fixed now in latest haxelib version.