Skip to main content

ApiButtonWidget

Class representing a button widget.

ApiButtonWidget is a subclass of ApiBaseWidget.

Methods​

The following table lists the available methods.

MethodReturnsDescription
DeletebooleanRemoves widget from parent field.
GetActionsApiActionCollectionGets actions collection.
GetActionsJSONJSONGets all field actions in json format.
GetBackgroundColorApiColor | null | undefinedGets widget background color.
GetBehaviorButtonBehaviorGets button widget behavior.
GetBorderColorApiColor | null | undefinedGets widget border color.
GetBorderStyleWidgetBorderStyleGets widget border style.
GetBorderWidthWidgetBorderWidthGets widget border width.
GetClassType"buttonWidget"Returns a type of the ApiButtonWidget class.
GetIconXPospercentageGets button widget icon x position.
GetIconYPospercentageGets button widget icon y position.
GetInternalIdstringReturns an internal ID of the current field widget.
GetLabelstring | null | undefinedGets label from button widget field.
GetLayoutButtonLayoutGets button widget layout type
GetParentApiFieldGets parent field.
GetPositionPointGets widget position.
GetRectRectSets field rect.
GetScaleHowButtonScaleHowGets button widget scale when type
GetScaleWhenButtonScaleWhenGets button widget scale when type
GetTextAlignWidgetTextAlign | undefinedGets widget text alignment.
GetTextColorApiColor | null | undefinedGets widget text color.
GetTextSizehpsGets widget text size.
IsAutoFitbooleanChecks if text is autofit.
IsFitBoundsbooleanChecks if button widget is fit bounds.
SetAutoFitbooleanSets text autofit.
SetBackgroundColorbooleanSets widget background color.
SetBehaviorbooleanSets button widget behavior.
SetBorderColorbooleanSets widget border color.
SetBorderStylebooleanSets widget border style.
SetBorderWidthbooleanSets widget border width.
SetFitBoundsbooleanSets button widget fit bounds.
SetIconXPosbooleanSets button widget icon x position.
SetIconYPosbooleanSets button widget icon y position.
SetImagebooleanSets image to button widget field.
SetLabelbooleanSets label to button widget field.
SetLayoutbooleanSets button widget layout type
SetPositionbooleanSets widget position.
SetRectbooleanSets field rect.
SetScaleHowbooleanSets button widget scale how type
SetScaleWhenbooleanSets button widget scale when type
SetTextAlignbooleanSets widget text alignment.
SetTextColorbooleanSets widget text color.
SetTextSizebooleanSets widget text size.