title: Python KivyMD: How is it possible to use on_active on MDCheckboxes?
body: <p>I'm currently facing some problems with the MDCheckbox. When I used the default Kivy Checkbox, the <code>on_active</code> parameter in the <code>kv</code> code seemed to work pretty good. But now I am trying to use the KivyMD <code>MDCheckbox</code> module with an <code>MDList</code> and try to add a function to the Checkbox via the <code>on_active</code> parameter:</p>
  
  <h2>Part of the kv code</h2>
  
  <pre><code>#:kivy 1.11.0
  #:import MDCard kivymd.card.MDCard
  #:import MDCheckbox kivymd.selectioncontrols.MDCheckbox
  #:import MDList kivymd.list.MDList
  #:import OneLineAvatarIconListItem kivymd.list.OneLineAvatarIconListItem
  
  &lt;ListItemWithCheckbox@OneLineAvatarIconListItem&gt;:
      MyAvatar:
          source: 'src/hdl.jpg'
      MyCheckbox:
  
  &lt;LayoutPy&gt;
      orientation: 'vertical'
  
      FloatLayout:
  
          MDCard:
              size_hint: .8, .5
              pos_hint: {'center_x': 0.5, 'center_y': 0.5}
  
              BoxLayout:
                  orientation: 'horizontal'
                  spacing: 20
                  name: 'lists'
  
                  ScrollView:
  
                      MDList:
                          id: scroll
  
                          ListItemWithCheckbox:
                              id: ckbx1
                              text: 'Box 1'
                              active: False
                              on_active: root.printS('Text 1')
  
  
                          ListItemWithCheckbox:
                              id: ckbx2
                              text: 'Box 2'
                              active: False
                              on_active: root.printS('Text 2')
  
                          ListItemWithCheckbox:
                              id: ckbx3
                              text: 'Box 3'
                              active: False
                              on_active: root.printS('Text 3')
  </code></pre>
  
  <h2>Part of the Python code</h2>
  
  <pre><code>from kivy.app import App
  from kivy.uix.floatlayout import FloatLayout
  from kivymd.theming import ThemeManager
  from kivy.uix.image import Image
  from kivymd.list import IRightBodyTouch, ILeftBody
  from kivymd.selectioncontrols import MDCheckbox
  from kivy.lang import Builder
  
  class LayoutPy(FloatLayout):
      def __init__(self, **kwargs):
          super(LayoutPy, self).__init__(**kwargs)
  
      def printS(self, text):
          print(text)
  
  class MyCheckbox(IRightBodyTouch, MDCheckbox):
      pass
  
  
  class MyAvatar(ILeftBody, Image):
      pass
  
  Builder.load_file(design.kv)
  
  class KivyGUI(App):
      theme_cls = ThemeManager()
      theme_cls.primary_palette = ("Teal")
      title = ("App")
  
      def build(self):
          c = LayoutPy()
          return c
  
  if __name__ == "__main__":
      KivyGUI().run()
  </code></pre>
  
  <p>I think unlike normal Kivy, KivyMD needs an additional <code>active</code> parameter to add functions to an MDCheckbox. I've tried to set an <code>active</code> parameter with a boolean value of True/False (I tried both and nothing seemed to work). I changed some parts of the code to make it easier for you but if you want to take a look on the original source code you can see it <a href="https://github.com/neuraln3t/LinguTrainer" rel="nofollow noreferrer">here</a>. (In the original source code the <code>MDCheckboxes</code> are on line 143.</p>
  
  <p>Many thanks in advance!</p>