Boxlayout with rounded edges and a border
Widget name: RoundedBoxLayout
This widget provides a custom made boxlayout which can have a choice of background colour, rounded corners with customizable radius and a coloured border with a variable width.
The RoundedBoxLayout class inherits from the BoxLayout class and so has all its properties like orientation, padding, spacing etc.
Following new properties are available with this custom class which can be set during its instance creation through Python or kv language.
Below given is the code for this custom widget in kv language.
This widget provides a custom made boxlayout which can have a choice of background colour, rounded corners with customizable radius and a coloured border with a variable width.
The RoundedBoxLayout class inherits from the BoxLayout class and so has all its properties like orientation, padding, spacing etc.
Following new properties are available with this custom class which can be set during its instance creation through Python or kv language.
- back_color - background colour to the layout.
- border_color - colour to the border of layout.
- corner_radius - curve radius for the corners.
- border_width - width of layout border.
Sample Output:
Below given is the code for this custom widget in kv language.





