Correct, it does not. That is because it's not always used with text. e.g. We use images to depict options, not text. Best would be to sub-class it (or the Label, or create a mix-in, or create a containing class?) and add the label you require...
Peace
--
You received this message because you are subscribed to a topic in the Google Groups "Kivy users support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kivy-users/ZzLhhW_S8vo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
ell, for example, it our case it's an Image, not a label. So having a "text" property makes no sense, just as a "source" property would make no sense for a label. So, because the semantics around creating this "label" would differ for use cases, it does not make a lot of sense to build it into the label. You could specify the position, yes, but not much else. Does that make sense, or am I missing you?
Cheers
--
You received this message because you are subscribed to a topic in the Google Groups "Kivy users support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kivy-users/ZzLhhW_S8vo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.boxlayout import BoxLayout
from kivy.properties import BooleanProperty
class MyCheckBox(BoxLayout):
active = BooleanProperty(False)
def on_active(self, widget, value):
print('active change to ' + str(value))
class TestApp(App):
def build(self):
return Builder.load_string('''
MyCheckBox:
CheckBox:
id: check_box
on_active: root.active = self.active
Label:
id: label
text: 'Hello'
on_touch_down: if self.collide_point(*args[1].pos): check_box.active = not check_box.active
''')
if __name__=="__main__":
TestApp().run()
--
You received this message because you are subscribed to a topic in the Google Groups "Kivy users support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kivy-users/ZzLhhW_S8vo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
from kivy.lang import Builderfrom kivy.base import runTouchApp
kv="""<LabelCheckBox@Label+CheckBox>: check_pos: "left" canvas: Clear
Color: rgb: 1, 1, 1 Rectangle: texture: self.texture size: self.texture_size pos: int(self.center_x - self.texture_size[0] / 2.), int(self.center_y - self.texture_size[1] / 2.)
Rectangle: source: 'atlas://data/images/defaulttheme/checkbox%s%s_%s' % (('_radio' if self.group else ''), ('_disabled' if self.disabled else ''), ('on' if self.active else 'off')) size: sp(32), sp(32) pos: int(self.x if self.check_pos == 'left' else self.x + self.width -sp(32)), int(self.center_y - sp(16))
GridLayout: cols: 2 rows: 2 LabelCheckBox: text: "Option 1" check_pos: "left" LabelCheckBox: text: "Option 2" check_pos: "right" LabelCheckBox: text: "Option 3" group: "group" check_pos: "left" LabelCheckBox: text: "Option 4" group: "group" check_pos: "right""""
root = Builder.load_string(kv)runTouchApp(root)To unsubscribe from this group and all its topics, send an email to kivy-users+...@googlegroups.com.
Thanks for the thought :-), but don't worry about it. It's simple enough, and was really just to help get you on track...
--
You received this message because you are subscribed to a topic in the Google Groups "Kivy users support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kivy-users/ZzLhhW_S8vo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.