1 Reply Latest reply on Nov 22, 2006 12:42 PM by ntsiii

    style attributes

    thespark
      Hi! How can I set the Left, Right, Top nad bottom properties that are in the layout constraints programmatically? Ihave the following that i use to ad few child controls in to Hbox:

      var sendButton:Button = new Button();
      sendButton.name = 'sendb';
      sendButton.addEventListener('click',senMsg);

      var cancelButton:Button = new Button();
      cancelButton.name = 'canb';
      cancelButton.addEventListener('click',senMsg);

      var mybox:HBox = new HBox();
      mybox.name = 'controlbox';
      mybox.percentWidth = 100;
      mybox.addChildAt(sendButton,0);
      mybox.addChildAt(cancelButton,0);

      I did try the following without sugges: cancelButton.setStyle('right', '90%');

      Thanks for advance!