unify / unify

Unify Project
http://www.unifyjs.com
Other
152 stars 16 forks source link

Label.setValue() does not resize the widget to the new content #19

Closed mojoaxel closed 12 years ago

mojoaxel commented 12 years ago

If a unify.ui.basic.Label is created with an empty value string and the value is set afterwards wit setValue the width of the widget is not updated.

var label = new unify.ui.basic.Label("");

Later in time:

label.setValue("I'm not insane, my mother had me tested!");

A workaround that could be used at the moment:

label.set({
    value: "I'm not insane, my mother had me tested!",
    width: 300 //dirty!
});
fastner commented 12 years ago

Relayout applies after setting new label value