It would be
newButton.setStyle("bottom", 10);
because the 'bottom' style has type Number.
- Gordon
________________________________
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of darylgmyers
Sent: Friday, February 09, 2007 1:46 PM
To: [email protected]
Subject: [flexcoders] Using setSyle on dynamic created button not
working
I'm creating a number of objects dynamically in actionscript. then I'm
using setStyle to set certain styles before addChild actually adds the
object to the container. The setStyle is not working. Below is a
small piece of the code.
varnewButton:Button = new Button;
newButton.label="Update";
newButton.setStyle("bottom","10");
newButton.addEventListener(MouseEvent.CLICK,clickUpdate);
newHBox.addChild(newButton);