SetRightBorder
Specifies the border which will be displayed at the right side of the page around the specified paragraph.
Inherited from ApiParaPr.SetRightBorder.
Syntax
expression.SetRightBorder(sType, nSize, nSpace, r, g, b);
expression - A variable that represents an ApiParagraph class.
Parameters
| Name | Required/Optional | Data type | Default | Description |
|---|---|---|---|---|
| sType | Required | BorderType | The border style. | |
| nSize | Required | pt_8 | The width of the current right border measured in eighths of a point. | |
| nSpace | Required | pt | The spacing offset to the right of the paragraph measured in points used to place this border. | |
| r | Required | byte | Red color component value. | |
| g | Required | byte | Green color component value. | |
| b | Required | byte | Blue color component value. |
Returns
boolean
Example
Add a border to the right side of a paragraph in a document.
// How do I place a visible border along the right edge of a paragraph in a document?
// Decorate a paragraph with a colored line on its right side in a document.
let doc = Api.GetDocument();
let paragraph = doc.GetElement(0);
paragraph.AddText("This is the first paragraph. We will add a two point orange border at its right side. ");
paragraph.AddText("The space between the right side of the paragraph and the border is 8 points. ");
paragraph.AddText("These sentences are used to add lines for demonstrative purposes. ");
paragraph.AddText("These sentences are used to add lines for demonstrative purposes.");
paragraph.SetRightBorder("single", 16, 8, 255, 111, 61);