Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-21433

[TLFTextField] FTETextField doesnt use specified leftMargin or rightMargin format

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Adobe Flex SDK Previous
    • Adobe Flex SDK Previous
    • Spark: FTETextField
    • None
    • Affected OS(s): All OS Platforms
      Language Found: English

    Description

      Found in 4.0.0.10872

      Steps to reproduce:
      1. Compile and run attached MXML file.
      2. Drag slider.
      3. Compare TextField vs FTETextField.

      Actual Results:
      TextField applies leftMargin.
      FTETextField does not.

      Expected Results:
      FTETextField applies leftMargin.

      Workaround (if any):
      n/a


      <?xml version="1.0" encoding="utf-8"?>
      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark"
      xmlns:mx="library://ns.adobe.com/flex/halo"
      xmlns:txt="flash.text.*">
      <s:controlBarContent>
      <s:Label text="leftMargin:" />
      <s:HSlider id="sl" value="20" maximum="30" valueCommit="sl_changeHandler(event);" />
      </s:controlBarContent>

      <fx:Script>
      <![CDATA[
      import mx.core.*;

      // private var fmt:TextFormat = new TextFormat(font, size, clor, bold, italic, underline, url, target, align, leftMargin, rightMargin, indent, leading);
      private const tf:TextField = new TextField();
      private const fte:FTETextField = new FTETextField();

      private function init():void

      { tf.defaultTextFormat = fmt2; tf.border = true; tf.text = "TextField"; can.rawChildren.addChild(tf); fte.defaultTextFormat = fmt2; fte.border = true; fte.text = "FTETextField"; fte.x = tf.width + 10; can.rawChildren.addChild(fte); }

      protected function sl_changeHandler(evt:Event):void

      { fmt2.leftMargin = sl.value; tf.defaultTextFormat = fte.defaultTextFormat = fmt2; tf.text = tf.text; fte.text = fte.text; }

      ]]
      >
      </fx:Script>

      <fx:Declarations>
      <txt:TextFormat id="fmt2" leftMargin="20" />
      </fx:Declarations>

      <mx:HBox id="can" x="20" y="20" creationComplete="init();" />

      </s:Application>

      Attachments

        Activity

          People

            adobejira Adobe JIRA
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: