Re: [flexcoders] Adding a button Icon

2010-03-15 Thread Robert VanCuren Jr
you need to use the setStyle method because icon is a style not a property.

myButton.setStyle("icon", source);

On Mon, Mar 15, 2010 at 8:20 AM, criptopus  wrote:

>
>
> // Add TLink To Issue Box
> issButArray.push(new Button());
> issButArray[i].icon="@Embed(source='icons/more.gif')";
> issHbxArray[i].addChild(issButArray[i]);
>
> Error :
>
> Cannot create property icon on mx.controls.Button
>
> how do I set a buttons icon programatically?
>
> - Stephen
>
>  
>


[flexcoders] Adding a button Icon

2010-03-15 Thread criptopus
// Add TLink To Issue Box
issButArray.push(new Button());
issButArray[i].icon="@Embed(source='icons/more.gif')";
issHbxArray[i].addChild(issButArray[i]);

Error :

Cannot create property icon on mx.controls.Button

how do I set a buttons icon programatically?

- Stephen