F Firpas Active Member Licensed User Longtime User May 20, 2016 #1 How to get/set Border Width and Corner Radius of pane by code?? Thanks in advance
I inakigarm Well-Known Member Licensed User Longtime User May 20, 2016 #2 Use CSSUtils code module (from Erel) and for example: B4X: CSSUtils.SetStyleProperty(Pane1,"-fx-border-radius","30") CSSUtils.SetStyleProperty(Pane1,"-fx-border-width","10") If you set radius and width as a variable (or to a Slider value), you can change this values easily Hint: Link for CSS Values (Oracle) & CSS values (simple) You can change the CSS Style directly from code but CSSUtils preserve all the CSS properties that node has. Last edited: May 20, 2016 Upvote 0
Use CSSUtils code module (from Erel) and for example: B4X: CSSUtils.SetStyleProperty(Pane1,"-fx-border-radius","30") CSSUtils.SetStyleProperty(Pane1,"-fx-border-width","10") If you set radius and width as a variable (or to a Slider value), you can change this values easily Hint: Link for CSS Values (Oracle) & CSS values (simple) You can change the CSS Style directly from code but CSSUtils preserve all the CSS properties that node has.
rwblinn Well-Known Member Licensed User Longtime User May 20, 2016 #3 Also note that in the latest version of B4J, CSSUtils is provided as a library. Select CSSUtils from the B4J IDE > Tab Libraries Manager. With that, no code module required. Upvote 0
Also note that in the latest version of B4J, CSSUtils is provided as a library. Select CSSUtils from the B4J IDE > Tab Libraries Manager. With that, no code module required.
F Firpas Active Member Licensed User Longtime User May 20, 2016 #4 Ok. Thank you for your replay Upvote 0
Erel B4X founder Staff member Licensed User Longtime User May 22, 2016 #5 You can use CSSUtils.SetBorder. Upvote 0