31 lines
837 B
Python
31 lines
837 B
Python
|
from kivy.uix.boxlayout import BoxLayout
|
||
|
from kivy.uix.popup import Popup
|
||
|
from kivy.properties import ObjectProperty
|
||
|
|
||
|
class CustomPopup(Popup):
|
||
|
pass
|
||
|
|
||
|
class SampleBoxLayout(BoxLayout):
|
||
|
checkbox_is_active = ObjectProperty(False)
|
||
|
def checkbox_18_clicked(self, instance, value):
|
||
|
if value is True:
|
||
|
print("Checkbox Checked")
|
||
|
else:
|
||
|
print("Checkbox is Unchecked")
|
||
|
|
||
|
blue = ObjectProperty(True)
|
||
|
red = ObjectProperty(False)
|
||
|
green = ObjectProperty(False)
|
||
|
|
||
|
def switch_on(self, instance, value):
|
||
|
if value is True:
|
||
|
print("Switch On")
|
||
|
else:
|
||
|
print("Switch Off")
|
||
|
|
||
|
def open_popup(self):
|
||
|
the_popup = CustomPopup()
|
||
|
the_popup.open()
|
||
|
|
||
|
def spinner_clicked(self, value):
|
||
|
print("Spinner Value " + value)
|