title: Can I create LinkButtons that wrap like textfields?
body: <p>I basically want to make things easier by just looping LinkButtons instead of making textfields because the linkbuttons have the rollovers already programmed.</p>
  
  <p>But I have a lot of text and it just keeps going. I want it to wrap like I can do with textfields.</p>
  
  <p>Thanks</p>
  
  <pre><code>package {
   import mx.controls.LinkButton;
   import flash.text.TextLineMetrics;
  
   public class multiLineLinkButton extends LinkButton {
        override protected function createChildren():void {
             super.createChildren();
             if (textField){
                  textField.wordWrap = true;
                  textField.multiline = true;
  
             }
        }
  
        override public function measureText(s:String):TextLineMetrics {
             textField.text = s;
             var lineMetrics:TextLineMetrics = textField.getLineMetrics(0);
             lineMetrics.width = 700;
             lineMetrics.height = textField.textHeight;
  
  
             return lineMetrics;
        }
   }
  </code></pre>
  
  <p>}</p>
  
  <p>This is the component, but like I said everything is automatically centered.</p>
  
  <p>I've tried paddingLEFT =0; and trying to setStyle("paddingLEFT", 0); but those methods don't work.</p>
  
  <pre><code>var test:multiLineLinkButton = new multiLineLinkButton();
  
          test.label = "sdfdsfdsfdsfsdfsdfsdfdsfsdfdsfdsdsfdsfdsfdffsdfdsfdfdsfdsfdsfdsfdsfdsfsdfdsfdfdsfdfdsfdsfsdfsdfsdf";
          test.setStyle("textAlign","left");
  
          var metrics:TextLineMetrics = measureText(test.label);
  
          trace(metrics.height);
          myCanvas.addChild(test);
  </code></pre>
  
  <p>so metrics.height is giving me a height of 14, which i believe is a single line even though it wraps.</p>