from GUI import Dialog, Label, Button, application

def ok():
    print "OK"

def cancel():
    print "Cancel"

dlog = Dialog(width = 250)
lbl = Label(text = "Eject the tomato?")
ok_btn = Button(title = "OK", action = ok)
cancel_btn = Button(title = "Cancel", action = cancel)

dlog.place(lbl, left = 20, top = 20)
dlog.place(ok_btn, left = 20, top = lbl + 20)
dlog.place(cancel_btn, right = -20, top = lbl + 20)
dlog.height = ok_btn.bounds[3] + 20

dlog.default_button = ok_btn
dlog.cancel_button = cancel_btn

dlog.show()
application().run()
