It would be
 
    newButton.setStyle("bottom", 10);
 
because the 'bottom' style has type Number.
 
- Gordon

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of darylgmyers
Sent: Friday, February 09, 2007 1:46 PM
To: flexcoders@yahoogroups.com
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);



 

Reply via email to