T Tales Souza New Member May 2, 2024 #1 Hello everybody, Is there an option in the Designer to place borders and gradients on a panel at the same time?
Hello everybody, Is there an option in the Designer to place borders and gradients on a panel at the same time?
Erel B4X founder Staff member Licensed User Longtime User May 5, 2024 #2 You can do it with the designer by putting a panel inside a panel where the inner panel is anchored to all sides with distances matching the border width: You can also add a border programmatically with: Code: Private Sub SetBorder(v As View, BorderWidth As Int, BorderColor As Int) v.Background.As(JavaObject).RunMethod("setStroke", Array(BorderWidth, BorderColor)) End Sub Code: SetBorder(Panel3, 5dip, xui.Color_Blue) Upvote 0
You can do it with the designer by putting a panel inside a panel where the inner panel is anchored to all sides with distances matching the border width: You can also add a border programmatically with: Code: Private Sub SetBorder(v As View, BorderWidth As Int, BorderColor As Int) v.Background.As(JavaObject).RunMethod("setStroke", Array(BorderWidth, BorderColor)) End Sub Code: SetBorder(Panel3, 5dip, xui.Color_Blue)