Skip to main content
Participant
Mar 3, 2009 1:12 PM UTC
Answered

Determine amount of columns

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 is closed to new replies. Start a new post to keep the conversation going.
rdermerCorrect answer
Inspiring
Mar 4, 2009 5:31 PM UTC
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.

4 replies

rdermerCorrect answer
Inspiring
Mar 4, 2009 5:31 PM UTC
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.
Translate
Participant
Mar 4, 2009 7:33 PM UTC
Thanks, that was the piece of information I was looking for :)

Translate
Participant
Mar 4, 2009 10:27 AM UTC
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?
Translate
Inspiring
Mar 3, 2009 5:37 PM UTC
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.

Translate