bdunkleysmith Active Member Licensed User Longtime User Apr 1, 2016 #1 I set the color of several rectangles in a particular application by using code like: B4X: Dim joRect As JavaObject = RinTeamFoulsRect joRect.RunMethod("setFill", Array(fx.Colors.Red)) Now I want to make the rectangle have rounded corners and so tried: B4X: Dim joRect As JavaObject = GameClockRect joRect.RunMethod("setArcHeight", 30) joRect.RunMethod("setArcWidth", 30) but syntax I've used for the arc parameters is throwing errors. Can someone please suggest the correct syntax? Thanks, Bryon
I set the color of several rectangles in a particular application by using code like: B4X: Dim joRect As JavaObject = RinTeamFoulsRect joRect.RunMethod("setFill", Array(fx.Colors.Red)) Now I want to make the rectangle have rounded corners and so tried: B4X: Dim joRect As JavaObject = GameClockRect joRect.RunMethod("setArcHeight", 30) joRect.RunMethod("setArcWidth", 30) but syntax I've used for the arc parameters is throwing errors. Can someone please suggest the correct syntax? Thanks, Bryon
Erel B4X founder Staff member Licensed User Longtime User Apr 1, 2016 #2 If it was a regular control then you could have used CSSUtils.SetBorder to set rounded corners. This code will work: B4X: Dim d As Double = 30 'must use double variable joRect.RunMethod("setArcHeight", Array(d)) joRect.RunMethod("setArcWidth", Array(d)) Upvote 0
If it was a regular control then you could have used CSSUtils.SetBorder to set rounded corners. This code will work: B4X: Dim d As Double = 30 'must use double variable joRect.RunMethod("setArcHeight", Array(d)) joRect.RunMethod("setArcWidth", Array(d))
bdunkleysmith Active Member Licensed User Longtime User Apr 1, 2016 #3 Thanks Erel, your tech support is amazing! Incidentally this application consumes data from an Arduino board and so I'm looking out for B4R with interest. Upvote 0
Thanks Erel, your tech support is amazing! Incidentally this application consumes data from an Arduino board and so I'm looking out for B4R with interest.