Skip to main content
Participant
December 1, 2009
Question

How to move content of text flow, not the container, only the content?

  • December 1, 2009
  • 1 reply
  • 394 views

Hey Folk.

I have text flow, which i try to make like Edit Box. For that, i set lineBreak to EXPLICIT and catch Keyboard event on Enter.

The problem:

My text flow includes paragraph which includes one spain.

When i fill the spain with text - the content width equals to container width, i try to add InlineGraphicElement to this text flow, the all inside data didn't move left automaticly, means i don't see the graphic element, it located outside the bound, only when i pressed right button, all data moves left and then the graphic element shown.

To solve it I think to check the width-s of container and the content and then if the content width is bigger then container width, move the content to the left, but cannot find how to make it.

Any ideas for moving content manually or other solutions?

P.S. Thanks for advice

This topic has been closed for replies.

1 reply

Adobe Employee
December 2, 2009

If you want the content to fit in a specified width, but allow the text to extend past that, the best way is exactly what you're doing; set lineBreak="explicit" on the TextFlow element. But in order to see content that extends horizontally past the edge of the container, you will need to scroll. If you are making your edits using the EditManager, TLF will automatically scroll so that the selection stays in view. By "selection" I mean the range of text specified by TextFlow.interactionManager.absoluteStart up to TextFlow.interactionManager.absoluteEnd. This assumes that the ContainerController has its horizontalScrollPolicy set to either "on" or "auto". As it scrolls, you will see the horizontalScrollPosition property of the controller change.

- robin