Skip to main content
Inspiring
October 12, 2009
Answered

Container full/empty event to create/remove next container

  • October 12, 2009
  • 2 replies
  • 803 views

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.
Correct answer HafizSultan

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
October 12, 2009

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
}
chicflashAuthor
Inspiring
October 13, 2009

Thanks a lot sultan