Skip to main content
Inspiring
Oct 12, 2009 6:04 AM UTC
Answered

Container full/empty event to create/remove next container

Sir,

I am creating a simple editor. now i want to create a new container each time previous container is full with text and/or images. also want to remove if it is empty. Can you help me which event will be helpful to do these two

Thanks

This topic is closed to new replies. Start a new post to keep the conversation going.
HafizSultanCorrect answer
Participant
Oct 12, 2009 12:22 PM UTC

Hi Raja

U need to do the following

To Add

if (textFlow.flowComposer.getControllerAt(textFlow.flowComposer.numControllers-1).calculateHeight()>textFlow.flowComposer.getControllerAt(textFlow.flowComposer.numControllers-1).compositionHeight) {

// create next controller

}

To Remove

if (textFlow.flowComposer.getControllerAt(textFlow.flowComposer.numControllers-1).calculateHeight()==0) {

// remove last empty container
}

2 replies

HafizSultanCorrect answer
Participant
Oct 12, 2009 12:22 PM UTC

Hi Raja

U need to do the following

To Add

if (textFlow.flowComposer.getControllerAt(textFlow.flowComposer.numControllers-1).calculateHeight()>textFlow.flowComposer.getControllerAt(textFlow.flowComposer.numControllers-1).compositionHeight) {

// create next controller

}

To Remove

if (textFlow.flowComposer.getControllerAt(textFlow.flowComposer.numControllers-1).calculateHeight()==0) {

// remove last empty container
}
Translate
chicflashAuthor
Inspiring
Oct 13, 2009 5:17 AM UTC

Thanks a lot sultan

Translate