line_width property

Border.line_width property

Gets or sets the border width in points.

@property
def line_width(self) -> float:
    ...

@line_width.setter
def line_width(self, value: float):
    ...

Remarks

If you set line width greater than zero when line style is none, the line style is automatically changed to single line.

Examples

Shows how to insert a string surrounded by a border into a document.

doc = aw.Document()
builder = aw.DocumentBuilder(doc=doc)
builder.font.border.color = aspose.pydrawing.Color.green
builder.font.border.line_width = 2.5
builder.font.border.line_style = aw.LineStyle.DASH_DOT_STROKER
builder.write('Text surrounded by green border.')
doc.save(file_name=ARTIFACTS_DIR + 'Border.FontBorder.docx')

See Also