Kivy Checkbox restrict click
<p>I am trying to create a checkbox in my float layout area. I am getting the checkbox to generate but every time I click it goes from True to False even if it not on the box. Could someone provide some insight?</p>

<p>My code:</p>

<pre><code>from kivy.app import App
from kivy.lang import Builder
from kivy.uix.checkbox import CheckBox
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.screenmanager import ScreenManager, Screen, NoTransition
from kivy.uix.textinput import TextInput
from kivy.uix.widget import Widget


#######``Windows``#######
class MainScreen(Screen):
    pass

class AnotherScreen(Screen):
    def add(self, *args):
        a = self.ids["a"].text
        a = int(a)
        self.ids["adds"]
        plus = 1 + a
        print plus

class ScreenManagement(ScreenManager):
    pass


presentation = Builder.load_file("GUI_Style.kv")

class MainApp(App):
    def build(self):
        return presentation

if __name__ == "__main__":
    MainApp().run()
</code></pre>

<p>My KV File:</p>

<pre><code>#: import NoTransition kivy.uix.screenmanager.NoTransition

ScreenManagement:
    transition: NoTransition()
    MainScreen:
    AnotherScreen:

&lt;MainScreen&gt;:
    background_color: 0.5, 1, 0.22, 1
    name: "main"
    FloatLayout:
        Button:
            text: "Quit"
            font_size: 50
            color: 0,1,0,1
            font_size: 25
            size_hint: 0.3,0.2
            pos_hint: {"x":0, "y":0}
            on_release: app.window().stop()
        Button:
            on_release: app.root.current = "other"
            text: "Next Screen"
            font_size: 50
            color: 0,1,0,1
            font_size: 25
            size_hint: 0.3,0.2
            pos_hint: {"right":1, "top":1}

&lt;AnotherScreen&gt;:
    name: "other"
    canvas.before:
        Color:
            rgba: 1, 1, 1, 1
        Rectangle:
            pos: self.pos
            size: self.size
    FloatLayout:
        CheckBox:
            pos_hint: {"x":0.2, "y":0.2}
            on_release: True
        TextInput:
            id: a
            font_size: 25
            password: True
            pos_hint: {"x":0.5, "y":0.5}
            size_hint: 0.3,0.2
            text: "Insert Side A here"
        Button:
            id: adds
            background_color: 0,0,1,1
            color: 0,1,0,1
            font_size: 25
            on_release: root.add()
            pos_hint: {"x":0, "y":0}
            size_hint: 0.3,0.2
            text: "plus"
        Button:
            color: 0,1,0,1
            background_color: 0,0,1,1
            font_size: 25
            size_hint: 0.3,0.2
            text: "Back Home"
            on_release: app.root.current = "main"
            pos_hint: {"right":1, "top":1}
</code></pre>

<p>Try placing the CheckBox in a Widget and it works. I mean:</p>

<pre><code>FloatLayout:
    Widget:
        CheckBox:
            pos_hint: {"x":0.2, "y":0.2}
            on_release: True
    TextInput:
        id: a
        font_size: 25
        password: True
        pos_hint: {"x":0.5, "y":0.5}
        size_hint: 0.3,0.2
        text: "Insert Side A here"
    Button:
        id: adds
        background_color: 0,0,1,1
        color: 0,1,0,1
        font_size: 25
        on_release: root.add()
        pos_hint: {"x":0, "y":0}
        size_hint: 0.3,0.2
        text: "plus"
</code></pre>

<p>of course it ruins your layout but it solves the problem you are having.</p>

python python-2.7 checkbox kivy kivy-language