This reference lists UIButton public API signatures. Code samples are displayed only when provided by the catalog.
Short examples assume a B4A project referencing ElevateUI, with xui As XUI and BtnAction As UIButton declared in Sub Globals. Create BtnAction first with Initialize + AddToParent or load a Designer layout using Activity.LoadLayout. Snippets mentioning BtnCancel also assume that second button has been created. Single-argument set/get pairs use property syntax: BtnAction.Text = "Hello" and Dim value As String = BtnAction.Text.
Public Sub Initialize (Callback As Object, EventName As String)
Purpose: Prepare the instance before its other methods.
Public Sub DesignerCreateView (BASE As Object, Lbl As Label, Props As Map)
Purpose: Invoked automatically by the B4A Visual Designer; do not call manually.
Public Sub AddToParent(Parent As B4XView, l As Int, t As Int, w As Int, h As Int, styleButtom As Int, text_zise As Float, text As String, textcolor As Int, backgroundColorOrColors As Object, corner As Int)
Purpose: Public API declaration; refer to the library behavior for usage details.
Public Sub setIcon(icon As String, icon_color As Int, iconTypeface As Typeface)
Purpose: Update icon at runtime when this setting changes.
Public Sub SetImage(DirImage As String, FileImage As String)
Purpose: Use SetImage for its named operation; follow its exact signature.
Sub setText(text As String)
Purpose: Update text at runtime when this setting changes.
Sub getText As String
Purpose: Read the current text value for validation or UI synchronization.
Public Sub setTextColor(Color As Int)
Purpose: Update text color at runtime when this setting changes.
Public Sub getTextColor As Int
Purpose: Read the current text color value for validation or UI synchronization.
Public Sub setTextSize(Size As Int)
Purpose: Update text size at runtime when this setting changes.
Public Sub getTextSize As Int
Purpose: Read the current text size value for validation or UI synchronization.
Public Sub setCornerRadius(Radius As Int)
Purpose: Update corner radius at runtime when this setting changes.
Public Sub getCornerRadius As Int
Purpose: Read the current corner radius value for validation or UI synchronization.
Public Sub setBackgroundColor(Color As Int)
Purpose: Public API declaration; refer to the library behavior for usage details.
Public Sub setBackgroundColors(ColorsList As List)
Purpose: Public API declaration; refer to the library behavior for usage details.
Public Sub getBackgroundColors As Int()
Purpose: Read the current background colors value for validation or UI synchronization.
Public Sub setGradientDirection(Direction As String)
Purpose: Public API declaration; refer to the library behavior for usage details.
Public Sub getGradientDirection As String
Purpose: Public API declaration; refer to the library behavior for usage details.
Public Sub setMainTextTypeface(TextTypeface1 As Typeface)
Purpose: Update main text typeface at runtime when this setting changes.
Public Sub getMainTextTypeface As Typeface
Purpose: Read the current main text typeface value for validation or UI synchronization.
Public Sub Elevation(BtElevation As Float, color As Int)
Purpose: Use Elevation for its named operation; follow its exact signature.
Public Sub SetTextGlow(Radius As Float, GlowColor As Int)
Purpose: Use SetTextGlow for its named operation; follow its exact signature.
Public Sub setStyleCode(StyleCode As Int)
Purpose: Get/set runtime button style; 1 filled, 2 outlined.
Public Sub getStyleCode As Int
Purpose: Get/set runtime button style; 1 filled, 2 outlined.