Hi, I'm using this code to clear the TextBox.

public static void clearTextShape(TextShape<?, ?> shape) {
    if (shape instanceof XSLFTextShape) {
        ((XSLFTextShape) shape).clearText();
    } else {
        List<?> paragraphs = shape.getTextParagraphs();
        paragraphs.clear();
    }
}



P.S. This is from none official


On 2019/12/22 02:28:03, Nathan Motter <[email protected]<mailto:[email protected]>> 
wrote:

> I have been struggling to remove a paragraph from a text box.  Could someone 
> provide and example?  Use Case: I am looping through a text box looking for 
> particular text.  Once I identify the text I want to remove the entire 
> paragraph.  Thanks for any help you can provide. >

>

> --------------------------------------------------------------------->

> To unsubscribe, e-mail: 
> [email protected]<mailto:[email protected]>>

> For additional commands, e-mail: 
> [email protected]<mailto:[email protected]>>

>

>

Reply via email to