I am experimenting with creating buttons and labels using code rather than the Designer but cant fathom how to assign certain properties to say a button. Eg. CornerRadius on a button. The property does not exist.
I discovered this bit of code
But how do you apply it to a button
Dim b as button?
button.xxxxxxxx = etc
Can you help please
Richard
I discovered this bit of code
B4X:
Dim Gradient1 As GradientDrawable
Dim clrs(2) As Int
clrs(0) = Colors.RGB(255,165,0)
clrs(1) = Colors.RGB(255,255,255)
Gradient1.Initialize("TOP_BOTTOM",clrs)
Gradient1.CornerRadius = 20dip
But how do you apply it to a button
Dim b as button?
button.xxxxxxxx = etc
Can you help please
Richard