Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
In Aspose.Words, the TextBox class is used to specify how a text is displayed inside a shape. It provides a public property named as Parent to get the parent shape for the text box to allow the customer to find linked Shape from linked TextBox.
The TextBox class provides the IsValidLinkTarget method in order to check whether the TextBox can be linked to the target Textbox.
The following code example shows how to check if the TextBox can be linked to the target Textbox:
There are several ways to display text in a shape. The TextBox can be the Head, Middle, or Tail of a sequence.
The following code example shows how to check if TextBox is a Head, Tail, or Middle of the sequence:
Using the BreakForwardLink method you can break the link to the next TextBox.
The following code example shows how to break a link for a TextBox:
Q: How can I check if a TextBox can be linked to another TextBox?
A: Call textBox.isValidLinkTarget(targetTextBox). The method returns true when the two text boxes belong to the same document and satisfy the linking rules; otherwise it returns false.
Q: How do I obtain the shape that contains a linked TextBox?
A: Use the textBox.getParent() property. It returns the parent Shape object, allowing you to access shape‑level properties or navigate to the linked shape.
Q: How can I determine whether a TextBox is the head, middle, or tail of a linked sequence?
A: The TextBox class provides isHead(), isMiddle(), and isTail() methods. Checking these methods tells you the position of the text box within the linked chain.
Q: How do I break a forward link from a TextBox?
A: Invoke textBox.breakForwardLink(). This removes the link to the next text box in the sequence, leaving the current box isolated.
Q: Can I link a TextBox to a shape that is not a TextBox?
A: No. Linking is only supported between TextBox objects. Attempting to link to other shape types will cause isValidLinkTarget to return false and the link operation will be ignored.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.