That is the correct behavior when simply setting the color in code. Either use the designer or I think you can use the colorDrawable object to set the radius.
Try something like this, though it is untested.
B4X:
Dim cd As ColorDrawable
cd.Initialize(Colors.Blue, 5)
btn1.Background = cd
barx and Erel,
Thanks for your replies. I will probably need that info sometime. However, I decided to redesign the way I want my buttons to work to avoid the situation and don't need your handy tips right now. You are so responsive to newbies like me and I can't tell you how refreshing that is. Thanks for your help. I know I will have more stupid...er...newbie questions forthcomming.
-Chuck
Old thread I now, but I just saw this problem with one label. Tried your code @barx and it worked, thanks.
Though, in the help that appears when you write label.Color there is this text "If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept" but my label is ColorDrawable as in the designer is created that way but when changing color by code, round corners are losen.
Private Sub Corner(V As B4XView,Clr As Int)
Dim Can As B4XCanvas
Can.Initialize(v)
Dim P As B4XPath
P.InitializeRoundedRect(Can.TargetRect,10dip)
Can.DrawPath(P,Clr,True,1)
Can.Invalidate
Can.Release
End Sub