Gordon, Thanks for your suggestion. I tried 10 insteead of "10" and it still doesn't work. I'm trying to set other style properties as well and they do not seem to work on a dynamically created item.
--- In [email protected], "Gordon Smith" <[EMAIL PROTECTED]> wrote: > > 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); >

