MList Active Member Licensed User Longtime User May 9, 2022 #1 Hi, this is a B4XPages project, i am writing my first B4J program. In Designer i created a button, which is a B4XView in pgm. Then i just set the Color and Border ( in B4A that worked fine) B4X: Copy v.SetColorAndBorder(Var.limadarkblue,1dip,xui.Color_White,15dip) unfortunately in B4j the color of the button is larger then the border, that looks not good. its the left button, the right button has setColorAndBorder(xui.color.transparent.... With the left button you see the dark blue color below the lower border See the pic, you must have a very close look What can i do here ? Thanks for your help Attachments setBorderColor.jpg 14.8 KB · Views: 511
Hi, this is a B4XPages project, i am writing my first B4J program. In Designer i created a button, which is a B4XView in pgm. Then i just set the Color and Border ( in B4A that worked fine) B4X: Copy v.SetColorAndBorder(Var.limadarkblue,1dip,xui.Color_White,15dip) unfortunately in B4j the color of the button is larger then the border, that looks not good. its the left button, the right button has setColorAndBorder(xui.color.transparent.... With the left button you see the dark blue color below the lower border See the pic, you must have a very close look What can i do here ? Thanks for your help
Solution MList May 18, 2022 Erel said: View attachment 129032 Add this: Code: Copy CSSUtils.SetStyleProperty(Button1, "-fx-background-insets", 1dip) Click to expand... Thanks a lot, Perfect ? ?
Erel said: View attachment 129032 Add this: Code: Copy CSSUtils.SetStyleProperty(Button1, "-fx-background-insets", 1dip) Click to expand... Thanks a lot, Perfect ? ?
Erel B4X founder Staff member Licensed User Longtime User May 9, 2022 #2 MList said: In Designer i created a button, which is a B4XView in pgm. Click to expand... Tip: B4XView is just an API wrapper. The button is a button. It doesn't matter if you set the variable type to B4XView or Button (and you can switch between the two when needed). I see the issue you describe. I'm not sure why it happens. It happens in the JavaFX layer. Add a reference to XUI Views and add this: Code: Copy CSSUtils.SetStyleProperty(Button1, "-fx-background-radius", 18dip) CSSUtils.SetStyleProperty(Button1, "-fx-focus-color", "transparent") It seems to solve it. Upvote 0
MList said: In Designer i created a button, which is a B4XView in pgm. Click to expand... Tip: B4XView is just an API wrapper. The button is a button. It doesn't matter if you set the variable type to B4XView or Button (and you can switch between the two when needed). I see the issue you describe. I'm not sure why it happens. It happens in the JavaFX layer. Add a reference to XUI Views and add this: Code: Copy CSSUtils.SetStyleProperty(Button1, "-fx-background-radius", 18dip) CSSUtils.SetStyleProperty(Button1, "-fx-focus-color", "transparent") It seems to solve it.
MList Active Member Licensed User Longtime User May 9, 2022 #3 Hi Erel , thanks for your answer. With your solution the corners look much better, but there is still a blue line under the lower border... in Pic i implemented your solution with the Save Button. Attachments setBorderColor.jpg 19.8 KB · Views: 496 Upvote 0
Hi Erel , thanks for your answer. With your solution the corners look much better, but there is still a blue line under the lower border... in Pic i implemented your solution with the Save Button.
Erel B4X founder Staff member Licensed User Longtime User May 10, 2022 #4 Add this: Code: Copy CSSUtils.SetStyleProperty(Button1, "-fx-background-insets", 1dip) Upvote 0
MList Active Member Licensed User Longtime User May 18, 2022 #5 Erel said: View attachment 129032 Add this: Code: Copy CSSUtils.SetStyleProperty(Button1, "-fx-background-insets", 1dip) Click to expand... Thanks a lot, Perfect ? ? Upvote 0 Solution
Erel said: View attachment 129032 Add this: Code: Copy CSSUtils.SetStyleProperty(Button1, "-fx-background-insets", 1dip) Click to expand... Thanks a lot, Perfect ? ?