I'm brand new to Kivy, but not new to programming.
I've got Home Automation/Security system I'm building using a BeagleBone Black. The monitoring screen is networked so I can view on any computer/Android device.
I've been working on a mockup of the monitor screen (picture below). I'm close to what I want, but the Checkboxes (actually, radio boxes as I'm using the 'group' command), except that I would like to differentiate the checkboxes/labels that are associated with a zone, from another zone. Currently, they all run together. The Buttons are easy to see that they're associated with a particular zone, but the checkboxes/labels just sort of all run together.
I'm wanting something - too new to Kivy to know what exactly - that will allow me to visually show that a series of checkboxes/labels is associated with the zone button - maybe a border, or a line, or something.
I'm looking for some suggestions, along with some code examples of how to implement a suggestion.
I'm posting the picture, the Python code, and the Kivy language code below, in that order.
![](https://lh5.googleusercontent.com/-tZTGn6M9Cds/Uz7OTBeCdSI/AAAAAAAAAD4/iyI55QS9XNM/s320/MonitorScreen.png)
====Python code ====
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# DynamicButtonText.py
#
#
# Given a Dictionary of dynamic names,
# pick each up and assign it to the Button text.
#
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.gridlayout import GridLayout
from kivy.uix.button import Button
from kivy.uix.label import Label
from kivy.uix.checkbox import CheckBox
class ZoneList():
_zoneL = ["Basement","Sun Room","Den","Living Room","Front Door"]
class ZoneElements(GridLayout):
pass
class ZoneCheckBoxes(GridLayout):
_instance_count = -1
_zoneNames = ZoneList._zoneL
def __init__(self, **kwargs):
super(ZoneCheckBoxes, self).__init__(**kwargs)
ZoneCheckBoxes._instance_count += 1
class ZoneButton(Button):
_instance_count = -1
_zoneNames = ZoneList._zoneL
def __init__(self, **kwargs):
super(ZoneButton, self).__init__(**kwargs)
ZoneButton._instance_count += 1
class ZoneLayout(BoxLayout):
def __init__(self, **kwargs):
super(ZoneLayout, self).__init__(**kwargs)
for i in range(len(ZoneList._zoneL)):
self.add_widget(ZoneElements())
class DynamicButtonText(App):
pass
def main():
DynamicButtonText().run() #run kivy app
return 0
if __name__ == '__main__':
main()
======end if Python code ===
====start of Kivy Language code ====
#dynamicbuttontext.kv
ZoneLayout:
<ZoneLayout>:
orientation: 'vertical'
<ZoneButton>:
text: "Zone " + str(root._instance_count + 1) + ": " + root._zoneNames[root._instance_count]
# text: "Button: "
<ZoneCheckBoxes>:
cols:2
CheckBox:
active: True
group: "Zone " + root._zoneNames[root._instance_count]
Label:
text: "Active"
CheckBox:
group: "Zone " + root._zoneNames[root._instance_count]
Label:
text: "Inactive"
CheckBox:
group: "Zone " + root._zoneNames[root._instance_count]
Label:
text: "Bypass"
CheckBox:
group: "Zone " + root._zoneNames[root._instance_count]
Label:
text: "Monitor"
CheckBox:
group: "Zone " + root._zoneNames[root._instance_count]
Label:
text: "Test"
<ZoneElements>:
cols: 2
ZoneButton:
ZoneCheckBoxes: