TLF Text Format value

Hi all

Are any function as setTextFormat as3 TextField function in TLF?

I suggest you look at EditManager.applyFormat (). This allows you to apply the character (leafFormat) level, at the level of paragraphs (paragraphFormat) or the attributes that apply to the whole container and manages all refresh as well. There is more low-level API on the individual FlowElements that you could use instead, but it's usually less work, if you can get applyFormat() to do what you want.

-robin

Tags: Adobe Open Source

Similar Questions

  • How to show the white space of the text formatted?

    Hello

    I use Jdev 11.1.1.6.0 with ADF Faces.

    I have a requirement to show a text report page in recorded format. The report in text format is saved as a text report several records with each line containing the maximum 78 characters.

    Each drive is formatted with a space to display the data in the column. For example:

    SUMMARY

    -------

    Col1 Col2 Col3

    xyz1234 abc9999 mno1234

    ...

    The report data appears currently unformatted. It removes the white space and shows just with a few default spaces. Something like:

    SUMMARY

    -------

    Col1 Col2 Col3

    xyz1234 abc9999 mno1234

    ...

    Thus, you cannot read the data with the appropriate column header. If you query the table in SQL Developer, it shows with perfect formatting. Also our legacy Oracle Forms application to display with the correct format.

    Currently, I tried following, but it does not work:

    < af:outputText value = "#{row.rptText}" id = 'ot1' "

    inlineStyle = "do-family:"Courier New";" font-size: 12.0pt; »

    noWrap = "false" / >

    I tried this on af:column too, especially noWrap = 'false', but so far without success.

    Any help is appreciated.

    Thank you

    JAI

    If you can use a converter custom jsf (validation and conversion of entry) to change in the query using "pre" helped the (text with pre sourrounf) when the data is rendered. The converter must implement two methods. Then you can try to use ' ' as a space of unbreakeable instead of simple spaces.

    Timo

  • Text format text field shows as a hyperlink?

    Hello

    I created a PDF form fillable which is automatically filled by VBA integrated in a macro on an Excel worksheet button.

    One of the pieces of data that are retrieved from the Excel sheet is a link to a Web site.

    When the PDF form is sent by e-mail to a customer that I need this link appears as a hyperlink to my client can easily open the site by clicking on the text field.

    After looking through all the format options, I don't see anything that will allow me to format the text as a hyperlink field, so I think I'm going to need a script any?

    The Web link is different for each form that is created if unfortunately is not a static address, which can be hard coded on the form.

    Any help with this would be much appreciated!

    Thank you!

    Using the option "Open a web link" would probably mean that the link should be predefined in the text field?

    This isn't what I meant. A script can be written that will (attempt to) open the current text in the text box, regardless of what it is in the browser. Basically, it would be something like this (as the mouse upward event):

    try {app.launchURL (event.target.value) ;} catch (e) {}

    Using the link option in Rich Text Format could put on to launch everything that is entered in the text rather than a predefined web address field?

    No, it must be set manually. I don't see how this feature of script.

  • Change background color of TLF text. How do I?

    Hello

    I have to TLF text (read-only) with the name of sMath10 inside MovieClip named content10. I want to chage the backgorund color from white to gray when the value of the text under 26 then. How can I do that. Please?

    Kind regards

    It's sMath10 is a valid reference in the scope of your code using the following syntax.  otherwise, try content10.sMath10 instead of sMath10 (if content10 is defined in the scope of your code).

    sMath10.background = true;

    sMath10.backgroundColor = 0xff0000;

  • TLF text error

    I'm building my first Flash site. When I enter the TLF text, it gives me the following error:

    ReferenceError: Error #1065: Variable TCMText is not defined.

    Here is the HTML code that was generated when I ran a swf file.

    Any additional advice and assistance would be greatly appreciated.

    < ! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict / / IN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" > ""

    "" <html xmlns= "http://www.w3.org/1999/xhtml" lang= "en" XML: lang= "en" > ".

    <head >

    <title >IndexRev25 < /title >

    " <meta http-equiv="Content-Type" content="text/html; charset = utf-8"/ >

    " <style type="text/css" media="screen"> " "

    HTML, body {height: 100%; background-color: #ffffff ;}}
    Body {margin: 0; padding: 0; overflow: hidden ;}}
    #flashContent {width: 100%; height: 100% ;}}
    < /style >

    < /head >

    <body >

    " <div id="flashContent"> ".

    "" " <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="129" height="54" id="IndexRev25" align="left"> .

    " <param name="movie" value="IndexRev25.swf"/ >

    " <param name="quality" value="high"/ >

    " <param name="bgcolor" value="#ffffff"/ >

    " <param name="play" value="true"/ >

    " <param name="loop" value="true"/ >

    " <param name="wmode" value="Windows"/ >

    " <param name="scale" value="showall"/ >

    " <param name="menu" value="true"/ >

    " <param name="devicefont" value="false"/ >

    " <param name="salign" value="lt"/ >

    " <param name="allowScriptAccess" value="sameDomain"/ >

    <!--[if ! IE] >->

    "" <by typeobject = "application/x-shockwave-flash" data= "IndexRev25.swf" width= "129" height= "54" > ""

    " <param name="movie" value="IndexRev25.swf"/ >

    " <param name="quality" value="high"/ >

    " <param name="bgcolor" value="#ffffff"/ >

    " <param name="play" value="true"/ >

    " <param name="loop" value="true"/ >

    " <param name="wmode" value="Windows"/ >

    " <param name="scale" value="showall"/ >

    " <param name="menu" value="true"/ >

    " <param name="devicefont" value="false"/ >

    " <param name="salign" value="lt"/ >

    " <param name="allowScriptAccess" value="sameDomain"/ >

    <!-<! [endif]-->

    " <a href= 'http://www.adobe.com/go/getflash" > ".

    " <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player"/ >

    </a>

    <!--[if ! IE] >->

    < /object >

    <!-<! [endif]-->

    < /object >

    </div>

    < /body >

    < /html >

    The error is in the code, not the HTML.

    Please send the ActionScript code. If she tells you where to find the code (line number, chassis, etc.) please go ahead and paste the code here. Chances are you are trying to access a variable 'TCMText' in a place that has no access to it.

  • Add a new column in a report to rich TEXT format

    I have a report to rich TEXT format and I want to add a new column that contains a formula of addition of let's say column A5 and A7. How do I get there? the A5 and A7 columns are the data loaded from the XML file. Thank you

    The example given by Vetri is for the actual columns in the xml file only.
    You can use

    Make sure that the values are not null. If so, convert or conditionally replaced by 0 number and use it.

  • Change the direction of TLF text field dynamically!

    Hello

    I want to change the direction of fields of TLF text dynamically.

    Can someboddy help.

    Hello

    Please try the following code:

    ------------------------------

    Import flashx.textLayout.formats.Direction;

    toggle_btn.addEventListener (MouseEvent.CLICK, change_dir);

    function change_dir(event:MouseEVent):void

    {

    if(text_field.direction == direction.) LTR)

    text_field. Direction = Direction.RTL;

    on the other

    text_field. Direction = Direction.LTR;

    }

    Concerning

    Soltani Barb please

  • Radio - text format buttons

    Hello world!

    I can't get this to work! I want the text on the buttons of radio to wrap correctly when they reach the end of the scene (right now they just go on forever.) Here is the code I use:

    package {}
    import flash.display.MovieClip;
    import flash.text.TextField;
    import flash.text.TextFormat;
    import flash.text.TextFieldAutoSize;
    import flash.events.Event;
    Import fl.controls.RadioButton;
    Import fl.controls.RadioButtonGroup;

    SerializableAttribute public class QuizQuestion extends MovieClip {}
    question private var: String;
    private var questionField:TextField;
    choice of private var: Array;
    private var theCorrectAnswer:int;
    private var theUserAnswer:int;

    variables of positioning:
    private var questionX:int = 25;
    private var questionY: int = 150;
    private var answerX:int = 25;
    private var answerY: int = 200;
    private var spacing: int = 25;

    public void QuizQuestion (theQuestion:String, theAnswer:int,... responses) {}
    store the arguments provided in the private variables:
    question = Ducoup;
    theCorrectAnswer = theAnswer;
    choice = answers;


    create and position the object textfield (question):
    questionField = new TextField();
    questionField.width = 775;
    questionField.wordWrap = true;
    questionField.multiline = true;
    questionField.text = question;


    trace (questionField.width);
    questionField.autoSize = TextFieldAutoSize.LEFT;
    questionField.x = questionX;
    questionField.y = questionY;
    addChild (questionField);


    Format text for radio buttons
    var txtFmt:TextFormat = new TextFormat();
    txtFmt.font = "Arial";
    txtFmt.blockIndent = 2;
    txtFmt.color = 0 x 000000;
    txtFmt.size = 11;
    txtFmt.leading = 4;

    create and position the radio buttons (responses):
    var myGroup:RadioButtonGroup = new RadioButtonGroup ("group1");
    myGroup.addEventListener (Event.CHANGE, changeHandler);
    for (var i: int = 0; i < choices.length; i ++) {}
    var rb: RadioButton = new RadioButton();
    rb.setStyle ("textFormat", txtFmt);


    rb.textField.autoSize = TextFieldAutoSize.LEFT;
    RB.label = choice [i];
    RB. Group = myGroup;
    RB. Value = i + 1;
    RB.x = answerX;
    RB.y = questionY + questionField.height + 25 + (I * spacing);
    addChild (rb);
    }
    }

    private void changeHandler(event:Event) {}
    theUserAnswer = event.target.selectedData;
    }
    public function get correctAnswer (): int {}
    Return theCorrectAnswer;
    }
    public function get userAnswer (): int {}
    Return theUserAnswer;
    }
    }
    }

    As you can see, I managed to get the style of text field option buttons to use "txtFmt' as the style:

    rb.setStyle ("textFormat", txtFmt);

    The question:

    If I add:

    rb.textField.width = 352;
    rb.textField.height = 60;
    rb.textField.multiline = rb.textField.wordWrap = true;

    inside the ' loop for "creating the option button, it is simply my crazy text! It extends the text about 30 pixels after the option button, and then start wrapping, which makes any stack. How can I do create the radio button, display the text on the text field, roll once it reaches the edge of the stage and continue the next button.

    Thank you in advance,

    Rafa.

    you not add the bottom of the issue of rb.  and the code that I have proposed changing the layout.  This does not solve the problem, but he amends the provision.  When you give misinformation, mislead you people who try to get you help.

    and there are problems.

    use:

    package {    import flash.display.MovieClip;    import flash.text.TextField;     import flash.text.TextFormat;    import flash.text.TextFieldAutoSize;    import flash.events.Event;    import fl.controls.RadioButton;    import fl.controls.RadioButtonGroup;
    
        public class QuizQuestion extends MovieClip {        private var question:String;        private var questionField:TextField;        private var choices:Array;        private var theCorrectAnswer:int;        private var theUserAnswer:int;
    
            //variables for positioning:        private var questionX:int = 25;        private var questionY:int = 150;        private var answerX:int = 25;        private var answerY:int = 200;        private var spacing:int = 25;
    
            public function QuizQuestion(whichQuestion:int, theQuestion:String, theAnswer:int, ...answers) {            //store the supplied arguments in the private variables:            question = theQuestion;            theCorrectAnswer = theAnswer;            choices = answers;               //Text Format for readio buttons               var txtFmt:TextFormat = new TextFormat();               txtFmt.font = "Arial";               txtFmt.blockIndent = 2;               txtFmt.color = 0x000000;               txtFmt.size = 12;               txtFmt.leading = 4;            //create and position the textfield (question):            questionField = new TextField();            questionField.width = 770;               questionField.wordWrap = true;               questionField.multiline = true;                questionField.text = question;               //trace (questionField.width);            questionField.autoSize = TextFieldAutoSize.LEFT;            questionField.x = questionX;            questionField.y = questionY;               questionField.setTextFormat(txtFmt);            addChild(questionField);            //create and position the radio buttons (answers):            var myGroup:RadioButtonGroup = new RadioButtonGroup("group1");            myGroup.addEventListener(Event.CHANGE, changeHandler);            var rbY:Number = questionField.y+questionField.height;
    
                   for(var i:int = 0; i < choices.length; i++) {                var rb:RadioButton = new RadioButton();                rb.setStyle("textFormat", txtFmt);                rb.textField.width = 352;rb.width=400;                rb.textField.autoSize = "left";                rb.textField.multiline  = rb.textField.wordWrap = true;                rb.textField.autoSize = TextFieldAutoSize.LEFT;                rb.label = choices[i];                rb.group = myGroup;                rb.value = i + 1;                rb.x = 30;                rb.y = rbY+rb.textField.height;
    
                    rbY = rb.y+rb.textField.height;
    
                    addChild(rb);            }        }
    
            private function changeHandler(event:Event) {            theUserAnswer = event.target.selectedData;        }        public function get correctAnswer():int {            return theCorrectAnswer;        }        public function get userAnswer():int {            return theUserAnswer;        }    }}
    
  • After re - install, when I "answer" text of the sender is in plain ASCII text format, regardless of the settings.

    I had trouble with Thunderbird, I so re-installed. (Version 38.2.0) I use TB for years, usually with no problems. But this time, after re - install, when I "answer" text of the sender is in plain ASCII text format, regardless of the settings. And plain text is bright blue!

    I want to preserve the HTML format (usual) of e-mail of the sender when I answer. My settings specify the HTML format.

    I don't want to use TB with this "disability" - help! Thank you!

    I don't see where you checked the compositions and the addressing of adjustment to your account. For all accounts also.

  • Text formatting will not work on 7.23

    Hello.

    It has been recently updated (about two weeks ago) that completely broke text formatting for me.

    None of the options work for me.

    They would look like this under my messages:

    * bold *.

    _italics_

    ~ bar ~

    {code} and I don't even know what to call this code from {}

    None of them appear correctly, yet other people I chat with that do not have this problem.

    What happened, and is there a way to fix this?

    Under "Tools" - "Options" - 'IM and SMS' - "Appearance IM", make sure that 'Show advanced text formatting' are checked.

  • How can I save data in text format

    How can I save data in text format in labwindows cvi

    Hello

    If your data is in a table, the easiest is to use the ArrayToFile function.

    Automatically, it creates a file and puts your data in it depending on the size you provide.

    If you have individual samples you need to write from time to time, you can either collect them in a table and then use ArrayToFile or open a file with fopen and write them as they are acquired with fwrite.

    Hope this helps,

  • How to generate a report in text format

    How to build a report in text format and send it to both a file and a printer?

    Hi Chuck,

    Yes, it seems that the printed report and save the report to the VI file seen in the link above from smercurio_fc is going to do what you need.

    Also, here is an example of our community that can be useful to print to the printer by default by using report generation,.

    I hope this helps!

  • Text formatting on SegmentedControl and inside the drop-down list

    Hello

    I'm trying to change the color of the text on the buttons of a SegmentedControl and part of a drop-down list.

    I don't want to change the skin, but only the text. With the drop down menu, I managed to change the upper part (just what you see when the drop down menu is closed) using

    myDropDown.button.setTextFormatForState(myUpColor, SkinStates.UP);
    

    etc, but with the elements inside the list and buttons SegmentedControl I can't find a property that lets me set the text format...

    Any ideas?

    It doesn't seem to be an easy way to do.

    The only way would be to extend the SegmentedControl and then override the following method with the following code. It should do the trick. We will work on making that it puts far more easily in the future.

    override protected function onButtonAdded(child : RadioButton) : void
            {
                var dpLength : int = __dataProvider.length;
                child.width = Math.round( width / dpLength );
                // change this to be percentages
                child.groupname = __groupName;
                //Set your formats to whatever you like here.
                            child.setTextFormatForState( ThemeGlobals.getTextFormat( ThemeGlobals.SEGMENTED_CONTROL_FORMAT_DISABLED ), SkinStates.DISABLED );
                child.setTextFormatForState( ThemeGlobals.getTextFormat( ThemeGlobals.SEGMENTED_CONTROL_FORMAT_OUT ), SkinStates.UP );
                child.setTextFormatForState( ThemeGlobals.getTextFormat( ThemeGlobals.SEGMENTED_CONTROL_FORMAT_DOWN ), SkinStates.DOWN );
                child.setTextFormatForState( ThemeGlobals.getTextFormat( ThemeGlobals.SEGMENTED_CONTROL_FORMAT_SELECTED ), SkinStates.SELECTED );
                child.setTextFormatForState( ThemeGlobals.getTextFormat( ThemeGlobals.SEGMENTED_CONTROL_FORMAT_SELECTED_DISABLED ), SkinStates.DISABLED_SELECTED );
                child.drawNow();
                // set the button text formats here
            }
    
  • loss of text format

    @when iam trying to display text that is formatted as clob. He loses the formatting... This is the code that iam using to display

    IAM using Express application 5.0.0.00.31

    DECLARE

    v_chunk_size NUMBER: = 2000; joelkallman-Oracle

    CURSOR l_cur IS

    SELECT EB_TEXT

    EBOOKS

    WHERE EB_SLNO =: P7_SLNO

    AND dbms_lob.getlength (EB_TEXT) > 0;

    BEGIN

    FOR l_rec in l_cur LOOP

    BECAUSE me in 1... ceil (dbms_lob.getlength (l_rec. EB_TEXT) / v_chunk_size)

    LOOP

    HTP. PRN (substr (l_rec. EB_TEXT, ((i-1) * v_chunk_size) + 1, v_chunk_size));

    END LOOP;

    END LOOP;

    END;

    How can I display the text without losing text format?

    Taharka Krishna wrote:

    Lose the paragraph formatting.

    This is because the HTML specification normally requires all the extra white space characters are collapsed and treated as a single space. However, preformatted text can be displayed using the pre element, in which whitespace is rendered as:

    DECLARE
    
      v_chunk_size NUMBER:=2000;
    
       CURSOR l_cur IS
      SELECT EB_TEXT
        FROM EBOOKS
       WHERE EB_SLNO= :P7_SLNO
        AND dbms_lob.getlength(EB_TEXT)>0;
    
    BEGIN
    
      htp.p('
    ');
    
      FOR l_rec in l_cur LOOP
          FOR i IN 1 .. ceil(dbms_lob.getlength(l_rec.EB_TEXT)/v_chunk_size)
          LOOP
            htp.PRN(substr(l_rec.EB_TEXT,((i-1)*v_chunk_size)+1, v_chunk_size));
          END LOOP;
      END LOOP;
    
      htp.p('/
    ');
    
    END;
    
  • Display radio group-Format values

    Hi all

    I use the Application Express 4.2.3.

    I have a group of buttons with the LOV query as follows:

    SELECT option1 | » '|| details as display, option1 AS return FROM my_table

    'details' are a hardcoded text in the table "my_table" enriched in the entry screen and stored as html text field

    When viewing in the radio group, details field appears in the html code.

    for example:

    Apple < p > < em > < strong > red in color. < facilities > < you /i > < / p >

    But I need the information should appear in the text formatted only.

    Any suggestions?

    Thanks in advance!

    Kind regards

    Archana

    For this radio group set "Escape special characters" no in the Security section of the element definition.

Maybe you are looking for