跳到主要内容

SetBorderColor

设置当前表单的边框颜色。

继承自 ApiFormBase.SetBorderColor。

语法​

expression.SetBorderColor(color);

expression - 表示 ApiComplexForm 类的变量。

参数​

名称必需/可选数据类型默认值描述
color可选ApiColor边框颜色。

返回值​

boolean

示例​

在文档中设置复合表单的边框颜色。

// How do I change the border color of a form in a document?

// Apply a custom border color to a form to highlight it within the document.

let doc = Api.GetDocument();
let complexForm = Api.CreateComplexForm({"key": "Complex1"});
let paragraph = doc.GetElement(0);
paragraph.AddElement(complexForm);
complexForm.SetBorderColor(Api.HexColor('#FF6F3D'));