Insert the ComboBox in text layout Framework (TLF)

Hello world

Anyone who has worked with Text Layout Framework (TLF)?

Please help me. I am facing a big problem.

According to TLF with the help of the 'insertInlineGraphic' method, we can add Image or DisplayObject in TLF. But this isn't the case. I try to add a combobox in TLF but no use.

Here's the line of code:

EditManager(_textFlow.interactionManager).insertInlineGraphic(new ComboBox(),100,40);

Please help me.

Kind regards

Amandeep Singh

Sorry, you are right. The line has a parent who takes care of his positioning. Then, when you look at the x, y, its 0 compared to its parent. If you look at the position of the parent DisplayObject, you would see that that is compared to the TextLine.

To get it in the global (stage) coordinates, call globalToLocal() on (x, y) position of the line. To get the coordinates from the line, you will need to take global coordinates and call textLine.localToGlobal, as the contact information of container, it would be the same, but the use of the container instead of the textLine.

Hope this helps,

-robin

Tags: Adobe Open Source

Similar Questions

  • Do rotate, tilt, the scale using the Text Layout Framework text?

    I saw through the flash/flex API and examples that a rotation is possible with the text layout framework, but it seems limited to 90-degree angles. Is it possible to make more complex angles (i.e. any angle arbitrary?) Also, is it possible to apply the chisel and scales? Why don't a raw array to the text?

    Text rotation is possible through the TLF, but only according to the angles specified by the documentation of the API. Entire TextFlow scale/rotation/inclination can be done by manipulating the container of the TextFlow.

  • Undo Text Layout Framework columncount problem

    Text Layout Framework columncount Undo problem:
    The number of times columncount is changed, it is applied to textflow

    and the number of operations is stored in undoStack (UndoManger). But when I

    cancel it, it returns to the initial state, without undoin step by step.
    I gave my source code...
    Is Yes or any other alternative to achieve this...
    Thanks in advance...

    <? XML version = "1.0" encoding = "utf-8"? >
    " < = xmlns:fx s:WindowedApplication ' http://ns.Adobe.com/MXML/2009 "

    xmlns:s = "library://ns.adobe.com/flex/spark".

    xmlns:MX = "library://ns.adobe.com/flex/mx" creationComplete = "init ()" >
    < fx:Script >
    <! [CDATA]
    Import flashx.textLayout.container.ContainerController;
    Import flashx.textLayout.conversion.ITextImporter;
    Import flashx.textLayout.conversion.TextConverter;
    Import flashx.textLayout.edit.EditManager;
    Import flashx.textLayout.edit.IEditManager;
    Import flashx.textLayout.edit.ISelectionManager;
    Import flashx.textLayout.edit.SelectionState;
    Import flashx.textLayout.elements.InlineGraphicElement;
    Import flashx.textLayout.elements.ParagraphElement;
    Import flashx.textLayout.elements.TextFlow;
    Import flashx.textLayout.events.SelectionEvent;
    Import flashx.textLayout.events.StatusChangeEvent;
    Import flashx.textLayout.formats.Direction;
    Import flashx.textLayout.formats.TextLayoutFormat;
    Import flashx.undo.UndoManager;

    Import mx.collections.ArrayCollection;
    Import mx.controls.Alert;
    Import mx.controls.CheckBox;
    Import mx.events.FlexEvent;
    Import mx.events.SliderEvent;

    Import spark.components.Group.
    Import spark.components.TextArea;
    Import spark.core.SpriteVisualElement;

    public var directions: ArrayCollection = new collection

    (Collection ArrayCollection
    [
    {label: "Left-right",}

    data: Direction. LTR},
    {label: "Right-to-Left",}

    data: Direction. RTL}
    ]
    );

    private var _textContainer:SpriteVisualElement = null;

    textInput:XML = private static const < TextFlow

    " xmlns =" http://ns.Adobe.com/TextLayout/2008 ">
    < div >
    < p > < span > The Text Layout Framework is

    an extensible library, built on the new text in Adobe Flash Player 10 engine,

    who offers advanced, easy-to-integrate typographic layout and text features

    for rich, sophisticated and innovative typography on the web.
    Some benefits offered by this framework

    includes: 1) rich typographical controls, including kerning, ligatures,

    typographic case, the case numbers, width of the figures and the optional hyphens
    (2) cut, copy, paste, undo and standard keyboard

    and movements of the mouse for edition 3) selection, editing and flowing text across

    multiple columns and linked containers
    (4) bidirectional text, vertical text and more

    30 writing scripts including Arabic, Hebrew, Chinese, Japanese, Korean, thai,.

    Laotian, Vietnamese, etc.
    (5) vertical text, Tate-Chu-Yoko (horizontal

    in a vertical text) and justifier of Asian typography. Try to change this

    text and playing with the options below! View an online image is also

    included. </span > < / p >
    < / div >
    < / TextFlow >;

    private var _textFlow:TextFlow;

    private function init (): void {}

    _textContainer = new SpriteVisualElement();

    canvas.addElement (_textContainer);
    importing var: = ITextImporter

    TextConverter.getImporter (TextConverter.TEXT_LAYOUT_FORMAT);

    _textFlow = importer.importToFlow (textInput);
    _textFlow.flowComposer.addController (new

    ContainerController(_textContainer, canvas.width-40, canvas.height));
    _textFlow.interactionManager = new

    EditManager (new UndoManager());

    _textFlow.flowComposer.updateAllControllers ();
    }

    private void changeNoColumns(event:Event):void {}
    var tlf:TextLayoutFormat = new

    TextLayoutFormat();
    tlf.columnCount = cols.value;
    tlf.columnGap = 15;
    Tlf.direction = direction.selectedItem.data;
    var em: EditManager =

    _textFlow.interactionManager as EditManager;
    em.selectAll ();

    (_textFlow.interactionManager as

    EditManager) .applyFormat (tlf, tlf, tlf);
    _textFlow.flowComposer.updateAllControllers ();
    }

    protected function

    undo_clickHandler(event:MouseEvent):void
    {
    var em: EditManager =

    _textFlow.interactionManager as EditManager;
    trace ("Can cancel" + em.undoManager.canUndo () +)

    ('can do' + em.undoManager.canRedo ());
    EM. Undo();
    }
    protected function

    redo_clickHandler(event:MouseEvent):void
    {
    var em: EditManager =

    _textFlow.interactionManager as EditManager;
    trace ("Can cancel" + em.undoManager.canUndo () +)

    ('can do' + em.undoManager.canRedo ());
    EM. Redo();
    }

    []] >
    < / fx:Script >
    < s:Panel title = "Text Layout Framework Sample' width = '100% '.

    Height = "100%" >
    < s:layout >
    < s:VerticalLayout paddingTop = paddingLeft '8' = '8' / >
    < / s:layout >

    < s:VGroup >
    < s:Group id = "canvas" width = "600" height = "200" / >
    < s:HGroup width = "100%" verticalAlign = "middle" >
    < s:Label text = "# columns:" / >
    < s:NumericStepper id = "collar" minimum = "1".

    maximum = "20" snapInterval = "1" change = "changeNoColumns (event)" / > "
    < s:Label text = "text direction:" / >
    < s:DropDownList id = "direction".

    changing dataProvider = "changeTextDirection (Event)" = "{statements}" "

    selectedItem = "{instructions [0]}" / >
    < s:Button label = "Cancel".

    Click = "undo_clickHandler (Event)" / >
    < s:Button label = "Redo".

    Click = "redo_clickHandler (Event)" / >
    < / s:HGroup >
    < / s:VGroup >
    < / s:Panel >

    < / s:WindowedApplication >

    It cannot be reproduced with TLF 3.0 + SDK 4.5.

  • Insert the ComboBox in TextArea

    Hello

    I have a problem with the insertion of a ComboBox in a TextArea.
    Is it possible to insert a comboBox in a text box, as shown in this photo?
    http://yfrog.com/09textareaj

    Concerning
    Chris


    Christoph,

    I'm not able to give an example of how do, because I've never tried. But I'm sure it's possible, that you are able to manipulate individual characters and other components inside a text box. But there is also something that crosses my mind: "Is this really necessary to make this complicated, component is there not an easier way to solve the problem?"

    Finally, take a look at the TextRange class, it might be useful. RichTextEditor from Adobe can help you too.

    Kind regards
    Peter

  • After inserting the widget blog, my layout is messed up

    I tried to insert the free blog widget in my site and I am trying to pin in the upper right corner. After doing this and noticed my page, everything suddenly climbed hundreds of pixels, I don't want to. What triggers this behavior and how can I solve this problem?

    Thanks in advance

    SEM

    What blog widget are you using? You may be able to go to the provider of the blog widget to support using the widget.

  • Scalability and performance of text Layout Framework

    I am rebuilding an old as2 application that supports the huge documents, sometimes in the order of 1000 + pages of text.   It had to be scrolls and not paged so I thought originally a way to break everything in discrete text and put stripes implemented scrolling with a few empty lines above and below that I would inject the content while scrolling.  It's a little messy but it reduces very well, especially considering it was in as2 lol.

    So now I'm back to this app and hope to take advantage of many of the great features of the TLF.   So the question is what can do to manage using the TLF and scrolling with extreme scalability in mind.    The first thoughts of the original that I have are to build a flow of the main text of the entire document, and then click fly pull specific lines of copy, but this solution seems already quite painful.

    So what are the thoughts you guys on how best to implement this?

    I know I could use the pagination for this, but I REALLY want to avoid it at all costs this does not work in all cases of my.

    Thank you!

    ~ JT

    Hello

    I recommend the following with the current state of things:

    (1) divide the long flow in chapters, each chapter being a separate here TextFlow.See the example of Pagination:

    http://blogs.Adobe.com/tlf/2008/12/ActionScript-pagination-exampl.html

    You will not have to choose between the chapters.

    (2) to virtualize your content - Flash objects are expensive - think of ways to make a virtual view of your document that minimzes the object count.  I would recommend scrolling discovers you page through new chapters created TextFlows, containers and TextLine so that those that are visible.

    (3) make at least a ContainerController and Sprite per page.  There has been some recent work that appears shortly which accelerates the composer a bit by adding at the end of a multi TextFlow container.  Logic was added so that the composer may proceed directly to the first damaged container. This does not all the performance issues with long flow, but it's a start.  Flex has not picked up this change yet, but it will be available soon.  Looking for TLF 527 or later.

    I have attached a test program and a SWF built with the skip to first logical damaged container.  Assuming that it publishes - compare that with your performance if you build the program to test with the current code.

    Note: as attached file as a .txt file - rename and rebuild with textLayout.swc common to the previous performance.  There is still much to do they use for excellent performance in all cases of long lava flows.

    Hope that helps,

    Richard

  • browser not showing no no scrollbar in the text layout component

    Hello

    my text layout works very much like SWF, but when I post I do not see the scroll bar in the html page.

    saying that I can use the mouse scroll to scroll the text.

    my XML:

    <? XML version = "1.0" encoding = "utf-8"? >

    " < flow: '5' TextFlow paddingTop ="5"="5"paddingBottom = paddingLeft paddingRight ="5"whiteSpaceCollapse = 'preserve' xmlns:flow = ' http://ns.Adobe.com/TextLayout/2008 " verticalScrollPolicy = "on" horizontalScrollPolicy = "auto" > < flow: p textAlignLast = 'right' textAlign = "justify" > < flow: span fontSize = '13' color = "0 x 666666" textDecoration = "underline" fontLookup = "embeddedCFF" fontFamily = "Regular FbTypograph"...

    just in case I added it in my AS3

    import flashx.textLayout.elements.TextFlow;

    flashx.textLayout.container import. *;

    ....

    myTextLayout.verticalScrollPolicy = ScrollPolicy.ON;

    any idea what went wrong?

    THX,

    Daniel

    TLF has policies that enable scrolling, but it deosn have actually any scrollbar widgets. You will need to get those Flex components and plug them. The best way to do this is to use the new Gumbo Flex4 components instead of just using TLF directly (see the RichEditableText class). Or, if you want a single ActionScript (no dependence of the Flex framework) application, you can create your own scroll bars and scroll by setting the verticalScrollPosition and horizontalScrollPosition on the ContainerController.

    Hope this helps,

    -robin

  • Framework in the context of text block text block

    Hi, I feel I ask a stupid question but I am about to throw my computer out the window, so I have about him asking anyway.

    I have a layout of book with a stream of regular text in any of the pages (my body text), but I created a line object with a text block I want to screw together in case goes on 2 pages, when I try to click on the Red [+] to connect the 2 text block, I can't. It wont let me click on it, I tried command - click as when you want to select an object in another, but it does not work.

    Is it possible to have a block of text within another framework? Maybe I did it the right way. Can someone help me with this please?

    Thanks in advance

    On the photo I cercled in red that I would like to be linked together (2 bluish objects), the thread of text that is already there is my block of text type where is my body text.

    Picture 2.jpg

    You cannot screw anchored text frames.

    Bob

  • can anyone provide a link to insert the image with the text on the button in the apex 4.2.6

    can anyone provide a link to insert the image with the text on the button in the apex 4.2.6

    ReemaPuri wrote:

    in the workspace image:-resign.jpeg

    As a button? Seriously?

    Ok. First of all, because the image already contains text, there no point in including the same wording in the form of text on the button. Accessibility requirements can be met using re-sign as alternative text. 4.2, create an image button:

    Tag/Alt text: Re-sign

    Static ID: re - sign

    Style button: Image

    Button Image: & WORKSPACE_IMAGES.resign.jpeg

    To make the image looks more like a button, add the following CSS to Inline CSS property page:

    #re-sign img {
      margin: 0 2px 2px 0;
      border: 2px outset;
      border-radius: 4px;
    }
    #re-sign img:active {
      margin: 2px 0 0 2px;
      border: 2px inset;
      border-radius: 4px;
    }
    

    Finally, there is a bug in 4.2 that generates the incorrect URL for the button images, which requires dynamic action of Page Load to fix.

    Event: Loading the page

    Action: Run the JavaScript Code

    Code

    var resignImg = $("#re-sign img");
    resignImg.attr("src", resignImg.attr("src").replace("/i/", ""));
    
  • Compare the text of the combobox as a condition in the calculation of the field another.

    I'm doing a condition, if one of the 15 comboboxes has a certain value of selected text list, then a button is displayed.

    I tried to follow this example, which I found here on another question:

    var t = document.getElementById ("fTerminalType");

    selectedText var = t.options [t.selectedIndex] .text;

    the part of my code that uses it is:

    for (i = 1; i < 16; i ++) {}

    var t = this.getField ("ComboBox" + i);

    var s = t.options [t.selectedIndex] .text;

    If (s == 'Specific text') {}

    k.Display = display.visible;

    }

    }

    "Combobox1" so has "A specific text" selected, but the "k" key does not appear visible, and the rest of the code (a calculation) returns empty.

    If I delete the internal code of "for () {}", the rest of the calculation works, if the syntax error is specific to the part of text comparison.

    I tried 'value', ".innerHTML", ". export.value", '.change' and '.changeEx' instead of '.text', nothing has worked.

    I don't know if pdf forms have jQuery, I could try it but that he would need assistance with the code so be it.

    Thank you.

    The value property returns the value of export of the selected item if it has one, otherwise it returns what appears, which is what you call text. SO if someone type something, you can retrieve it with the value property, even though you really better to use valueAsString. Check the console JavaScript (Ctrl + J) to see if errors are reported.

    If you need to get the value of the export value display, you can use the field currentValueIndices property to get the index of the selected item and use it with the field getItemAt method to get the display value. A code example is the Acrobat JavaScript reference.

    I don't notice anything wrong with your script updated, if you add a break after the k.display statement statement, since you do not need to keep a loop once it is set. Unclear if it is initialized to display.hidden somehow, what would make sense.

  • HOW to: Insert the symbol of the degree in text

    An another "How To" question.

    Running PE 13.1 on a Windows PC with WIN 7 64-bit.

    How to insert the symbol of the degree in text - I would like to have something like "temperature + 2 < degree symbol > water C.

    where < degree symbol > is the small circle (triggered).

    I found how to insert copyright (Alt + 0169) & the Tilde (Alt + 126) helped by Wikipedia, but the Windos ciode for the degree symbol is not shown - just the

    Unicode U + 2103 but Alt + 2103 just inserts a '7'.

    HEM

    HEM

    If you have the copyright © symbol to work for you with Alt + 0169, I think Alt + 0176, you should get the degree symbol as in 32 °.

    If please give it a try in the Titler, open Premiere Elements and let us know if it worked for you.

    Thank you.

    RTA

  • Photoshop CC: Workspace flashing black when inserting the Guides &amp; completely black when adding text

    Recently I bought Photoshop CC (2 days ago) and shortly after installation I jumped on Photoshop CC, and began to implement the prefferences for my personal use and started to just do some basic stuff and see what's new in the CC when insertion Guides and adding text to the workspace started to flash/stay BLACK. I don't know what is happening but my specs are better than the minimum requirements? No idea what happened? Operating system: Windows 8.1

    It is a well known bug of Windows 8.

    Update your video card driver from the site of the manufacturer of the GPU (NON-microsoft). If for any reason, you cannot update the video card driver, then go into Photoshop preferences and set GPU "basic" mode and restart Photoshop.

  • Display of text of the Combobox to type?

    Hello

    I do a stand-alone text field displaying the full word as long as the user types, but the word must make choices in a ComboBox.

    So, as they type 'a', if the first choice in the drop-down list is "Apple", apple appears in the text box. They type "aw", then, if "in the loop" is the first ' aw' displayed in the combobox Word, aware etc.»

    I'm about 1/3 is coding path through it, and thought I would ask here is a standard way to do this?

    for simplicity, I use the channels, if you have a Combo´Box with a DataProvider simply use instead

    var channels: Array = ["america", "australia", "alligator", "anchorman"];

    Strings.sort ();

    tf.addEventListener (Event.CHANGE, autocomplete);

    function autocomplete(e:Event):void

    {

    var entry: Array = e.target.text.split("");

    for (var i: uint = 0; i

    {

    for (var j: uint = 0; j

    {

    for (var k: uint = 0; k

    {

    var arrstrings:Array = strings [j].split("");

    If (input [i] == arrstrings [k])

    {

    e.Target.Text = strings [j];

    e.target.setSelection(0,e.target.text.length);

    return;

    }

    on the other

    {

    e.Target.Text = "NO MATCH FOUND";

    e.target.setSelection(0,e.target.text.length);

    }

    }

    }

    }

    }

  • Why can't I change the properties of film text in the text layout Panel?

    When you select graph opjects I can't change their properties text wrap in the text layout Panel.   Wrap of graphic objects properties appear correctly in the Panel, I just can't change.  It's as if something I'm lock out of any changes.   This used to work, but apparently something happned in the world that locked me out to change most of the things on the panels.   I get the content to pages by importing an XML file.

    Maybe this will help: panels and InDesign tools answer not to the clicks of the mouse (Windows 7/Vista)

  • How to insert the "html" text in the text block?

    Hello everyone!

    I have the question of the object. So, I want to insert the type html content in the block of text, something like this:

    Header text in italic and bold styles

    Some content in the normal template

    I know I should use

    TextFrame.Paragraphs.Add ('of content', null, null)

    and

    CharacterAttributes

    but don't know exactly how to write it.

    Please give me some examples?

    Thank you.

    need to make semi-auto, you start by creating two character styles in the user interface, we will call "bold" and "italic", then apply these styles to characters in the script

    var idoc = app.activeDocument;
    var itext = idoc.textFrames[0];
    
    var irangeItalics = itext.words[3];
    var irangeBold = itext.words[5];
    
    var boldstyle = idoc.characterStyles["bold"];
    var italicstyle = idoc.characterStyles["italics"];
    
    boldstyle.applyTo(irangeBold);
    italicstyle.applyTo(irangeItalics);
    

Maybe you are looking for