iOS Question Resize circle B4XRadioButton

angel_

Well-Known Member
Licensed User
Longtime User
I'm trying to change (by code) the circle of the radiobutton but I can't do it.

B4X:
Private Sub B4XPage_Resize (Width As Float, Height As Float)
    #if B4i
        Dim r As Rect = B4XPages.GetNativeParent(Me).SafeAreaInsets
        Root.SetLayoutAnimated(0, r.Left, r.Top, Width - r.Right - r.Left, Height - r.Bottom - r.Top)
    #end if

    Resize1(B4XRadioButton1)
    Resize2(B4XRadioButton2)
End Sub

Sub Resize1(xrbt As B4XRadioButton)
    Dim Height As Int = 30dip
   
    xrbt.mBase.GetView(1).Height = Height
    xrbt.mBase.GetView(1).Width = xrbt.mBase.GetView(0).Height
    xrbt.mBase.GetView(1).top = (Height - xrbt.mBase.GetView(0).Height) / 2
End Sub

Sub Resize2(xrbt As B4XRadioButton)
    Dim Height As Int = 40dip
   
    xrbt.mBase.GetView(2).Height = Height
    xrbt.mBase.GetView(2).Width = xrbt.mBase.GetView(0).Height
    xrbt.mBase.GetView(2).top = (Height - xrbt.mBase.GetView(0).Height) / 2
End Sub
 

angel_

Well-Known Member
Licensed User
Longtime User
I wanted to give it dimensions smaller than usual, in B4A I can do it with code
 
Upvote 0

Semen Matusovskiy

Well-Known Member
Licensed User
If you need classic view, you can use Label instead of B4XRadioButton. Label supports CSBuilder, you can make a combination with FontAware icon.
 
Upvote 0
Top