ApiButtonWidget
ApiButtonWidget 是 ApiBaseWidget 的子类。
方法
| 方法 | 返回值 | 描述 |
|---|---|---|
| Delete | boolean | 从父字段中移除控件。 |
| GetBackgroundColor | ApiColor | 获取控件背景颜色。 |
| GetBehavior | ButtonBehavior | 获取按钮控件行为。 |
| GetBorderColor | ApiColor | 获取控件边框颜色。 |
| GetBorderStyle | WidgetBorderStyle | 获取控件边框样式。 |
| GetBorderWidth | WidgetBorderWidth | 获取控件边框宽度。 |
| GetClassType | "buttonWidget" | 返回 ApiButtonWidget 类的类型。 |
| GetIconXPos | percentage | 获取按钮控件图标的 x 位置。 |
| GetIconYPos | percentage | 获取按钮控件图标的 y 位置。 |
| GetLabel | string | 从按钮控件字段获取标签。 |
| GetLayout | ButtonLayout | 获取按钮控件布局类型 |
| GetPosition | Point | 获取控件位置。 |
| GetRect | Rect | 设置字段矩形。 |
| GetScaleHow | ButtonScaleHow | 获取按钮控件缩放时机类型 |
| GetScaleWhen | ButtonScaleWhen | 获取按钮控件缩放时机类型 |
| GetTextColor | ApiColor | 获取控件文本颜色。 |
| GetTextSize | pt | 获取控件文本大小。💡 文本大小 === 0 表示自动适应 |
| IsAutoFit | boolean | 检查文本是否自动适应。 |
| IsFitBounds | boolean | 检查按钮控件是否适应边界。 |
| SetAutoFit | boolean | 设置文本自动适应。 |
| SetBackgroundColor | boolean | 设置控件背景颜色。 |
| SetBehavior | boolean | 设置按钮控件行为。 |
| SetBorderColor | boolean | 设置控件边框颜色。 |
| SetBorderStyle | boolean | 设置控件边框样式。 |
| SetBorderWidth | boolean | 设置控件边框宽度。 |
| SetFitBounds | boolean | 设置按钮控件适应边界。 |
| SetIconXPos | boolean | 设置按钮控件图标的 x 位置。 |
| SetIconYPos | boolean | 设置按钮控件图标的 y 位置。 |
| SetImage | boolean | 为按钮控件字段设置图像。 |
| SetLabel | boolean | 为按钮控件字段设置标签。 |
| SetLayout | boolean | 设置按钮控件布局类型 |
| SetPosition | boolean | 设置控件位置。 |
| SetRect | boolean | 设置字段矩形。 |
| SetScaleHow | boolean | 设置按钮控件缩放方式类型 |
| SetScaleWhen | boolean | 设置按钮控件缩放时机类型 |
| SetTextColor | boolean | 设置控件文本颜色。 |
| SetTextSize | boolean | 设置控件文本大小。💡 文本大小 === 0 表示自动适应 |