MX ListBox Dynamic Height Problem

Why? Why? Why?

I’m using the Flash MX ListBox UI Component, attempting to set the label height dynamically (to account for wraping text).

Please note the following (simplified) code in FLabel:

This does NOT work:

//::: PUBLIC METHODS
FLabelClass.prototype.setLabel = function(label)
{
// set height
this.labelField._height = 15;
}

But this does:

//::: PUBLIC METHODS
FLabelClass.prototype.setLabel = function(label)
{
// set textColor
this.labelField.textColor = 0xffffff;
}

Thoughts? Suggestions on another direction? Sympathy?

I was under the understanding that labels would not wrap under the component. You can change width and size of the component, but I dont know of a way to make the label wrap. Perhaps someone will educate us.

You can force a label to wrap thusly:

this.labelField.autosize = “left”;