author | Radek Brich <radek.brich@devl.cz> |
Sat, 15 Mar 2014 11:05:12 +0100 | |
changeset 83 | ebe732b9ef19 |
parent 77 | fc1989059e19 |
permissions | -rw-r--r-- |
# -*- coding: utf-8 -*- from tuikit.button import Button class Checkbox(Button): '''Checkbox - button.''' def __init__(self, label=''): Button.__init__(self, label) self.checked = False self.prefix = '[ ] ' self.suffix = '' self.align = 'left' self.bg = 'normal' self.bghi = 'active' def on_click(self, ev): if self.checked: self.checked = False self.prefix = '[ ] ' else: self.checked = True self.prefix = '[x] ' self.redraw()