Skip to main content
Inspiring
April 6, 2010
Question

Insert Custom Components into TextLine

  • April 6, 2010
  • 1 reply
  • 2023 views

Hi,

What is the best way to modify TLF so I can insert custom component into TexLines (others than inline images). For example I want to be able to insert a button and have the same behavior the inline images have.

Thanks in advance.

This topic has been closed for replies.

1 reply

Participating Frequently
April 6, 2010

If you're talking about Flex components like <mx:Button> or <s:Button>, they have to live inside of an appropriate Flex container. A text-displaying component like <s:TextArea> isn't such a container. (I.e., you can't put a Button inside a TextArea.) So I suggest using a TextArea/Button sibling combination like

<s:Group>

    <s:TextArea>

    <s:Button>

</s:Group>

where the TextArea's TextFlow has an inline graphic where you want the Button to appear, and you write ActionScript code to position the Button on top of the inline graphic.

Gordon Smith

Adobe Flex SDK Team

oscar7878Author
Inspiring
April 6, 2010

Hi Gordon,

Thanks for your response. I think I didn't explain my idea correctly.

In the TLF you can add images, for instance, using InlineGraphicElement components. What I want to do, is be able to create custom component that can be inserted into, for example, a RichText component, in the same way the inline images (InlineGraphicElement) work. I want to extend TLF to support some other custom elements.

Thanks.

Participant
June 13, 2010

Hello,

Have you had any progress with this issue?

Thanks.