|
Revision 1, 0.6 kB
(checked in by tal, 1 year ago)
|
initial import |
| Line | |
|---|
| 1 |
from dialogKit import * |
|---|
| 2 |
|
|---|
| 3 |
class CheckBoxDemo(object): |
|---|
| 4 |
|
|---|
| 5 |
def __init__(self): |
|---|
| 6 |
self.w = ModalDialog((200, 120), 'CheckBox Demo') |
|---|
| 7 |
self.w.checkBox1 = CheckBox((10, 10, 180, 20), 'CheckBox 1', callback=self.checkBox1Callback, value=True) |
|---|
| 8 |
self.w.checkBox2 = CheckBox((10, 40, 180, 20), 'CheckBox 2', callback=self.checkBox2Callback) |
|---|
| 9 |
self.w.open() |
|---|
| 10 |
|
|---|
| 11 |
def checkBox1Callback(self, sender): |
|---|
| 12 |
print 'CheckBox 1:', sender.get() |
|---|
| 13 |
|
|---|
| 14 |
def checkBox2Callback(self, sender): |
|---|
| 15 |
print 'CheckBox 2:', sender.get() |
|---|
| 16 |
|
|---|
| 17 |
CheckBoxDemo() |
|---|