SetBorderWidth
设置控件边框宽度。
语法
expression.SetBorderWidth(sBorderWidth);
expression - 表示 ApiBaseWidget 类的变量。
参数
| 名称 | 必需/可选 | 数据类型 | 默认值 | 描述 |
|---|---|---|---|---|
| sBorderWidth | 必需 | WidgetBorderWidth | 未提供描述。 |
返回值
boolean
示例
此示例设置字段控件的边框宽度。
let doc = Api.GetDocument();
let page = doc.GetPage(0);
let textField = Api.CreateTextField([10, 10, 160, 30]);
page.AddObject(textField);
textField.AddWidget(0, [10, 40, 160, 60]);
let widgets = textField.GetAllWidgets();
let rgbColor = Api.RGB(255, 100, 0);
widgets.forEach(function(widget) {
widget.SetBorderColor(rgbColor);
widget.SetBorderWidth('thick');
});