0 Replies Latest reply on Dec 7, 2009 8:43 AM by martin.berg

    Writring a custom VBox


      I have written a component extending VBox and containting 2 labels,
      this component is a popup, the problem i have is that the component
      does not scale if i dont set the width and height of it it defaults to

      And the labels inside it dont want to provide me their size too, when
      I do label.width or label.textWidth it always returns 0 even if the
      text is not null?

      I also set autosize = true; nothing works how can I make this
      components scale dynamically ?

      public class VizDetailCloud extends VBox {
             public var fieldName:String;
               public var fieldSizeEncoding:String;
               public var fieldColorEncoding:String;

               public functionVizDetailCloud() {
                   autoLayout = true;

      public function position(..):void {
                   width = 125; // if this is not set it defaults to 0 even
      with the content not null
                   height = 54;