Skip to main content
Participant
March 3, 2009
Answered

Determine amount of columns

  • March 3, 2009
  • 3 replies
  • 670 views
Is it possible to determine the amount of columns a textflow generates when textFlow.columnCount = FormatValue.AUTO?

textFlow.computedContainerFormat.columnCount gives back "auto".
This topic has been closed for replies.
Correct answer rdermer
It is possible by examining the TextFlowLines attached to the flowComposer using the APIs. ContainerControllers have an absoluteStart and a textLength.

You could access the last TextFlowLine in a container and examine its columnIndex.

3 replies

rdermerCorrect answer
Adobe Employee
March 4, 2009
It is possible by examining the TextFlowLines attached to the flowComposer using the APIs. ContainerControllers have an absoluteStart and a textLength.

You could access the last TextFlowLine in a container and examine its columnIndex.
Participant
March 4, 2009
Thanks, that was the piece of information I was looking for :)

Participant
March 4, 2009
Thanks, that works. Is it also possible to determine how many of the columns are filled with text?

Basically what I want to do is to create some sort of paging system by masking and showing only one column at a time. I need to know the amount of filled columns to enable paging controls.

Or would it be preferable to use linked containers?
Adobe Employee
March 3, 2009
The computed format is the result of the cascade - not the actual property.

DisplayObjectContainerController.columnState returns a ColumnState object that has the column settings.

You can also use ColumnState.createColumnState to try out different settings.