Posts

A Label with border

Widget name: BorderedLabel This custom widget gives you a label with a choice of border of customizable width and color. One of the uses of this is to create a table like structure for displaying data. This class inherits from the Label class and hence has all its properties. Following additional properties are available with the widget which gives its custom characteristics. border_color - This defines color of the label border. border_width - This sets the label border width. Sample Output Code( GitHub ) Usage Adding label though python Adding widget through kv laguage

Boxlayout with rounded edges and a border

Image
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. 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: Code ( GitHub ) Below given is the code for this custom widget in kv language. Usage One can look to use it directly through kv language or by defining a class in Python and adding it to other widgets via add_widget function call. Adding the widget using kv language kv file cont...