Circular check box

For this example, we need to make some changes in our kv file to get a circular check box and the other procedure and functions will remain same as used in the above example. To make the check box circular we need to pass the group in our kv file.

Syntax:

MDFloatLayout:

MDCheckBox:

group:’group’

Implementation:

Python3




# importing builder
from kivy.lang import Builder
  
# importing MDApp
from kivymd.app import MDApp
  
# writing kv lang
KV = '''
# defining layout
MDFloatLayout:
    # this will make a circular check box
    MDCheckbox:
        group: 'group'
          
        # defining size of check box
        size_hint: None,None
        size: "48dp", "48dp"
          
        # giving location
        pos_hint: {'center_x': .5, 'center_y': .5}
          
'''
  
# app class
class Test(MDApp):
    def build(self):
        
          # this will load kv lang
        screen = Builder.load_string(KV)
          
        # returning screen
        return screen
  
# running app
Test().run()


Output:



How to Create Checkbox in Kivymd-Python

In this article, we will see how to add the Check box in our application using KivyMD in Python. KivyMD is a collection of Material Design compliant widgets which can be used with Kivy.

Similar Reads

Installation:

To install these modules type the below command in the terminal....

Square Check Box

Step 1: Import required packages....

Circular check box

...