Created
March 8, 2013 08:50
-
-
Save typemytype/5115089 to your computer and use it in GitHub Desktop.
extend vanilla sheet demo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from vanilla import * | |
class SheetDemo(object): | |
def __init__(self, parentWindow): | |
self.w = Sheet((200, 100), parentWindow) | |
self.w.myButton = Button((10, 10, -10, 20), "My Button") | |
self.w.myTextBox = TextBox((10, 40, -10, 17), "My Text Box") | |
self.w.closeButton = Button((10, -30, 80, 22), "Close", self.closeCallback) | |
self.w.open() | |
def closeCallback(self, sender): | |
self.w.close() | |
class DummyWindowController(object): | |
def __init__(self): | |
self.w = Window((400, 50)) | |
self.w.openSheet = Button((10, 10, -10, 22), "Open Sheet", callback=self.openSheetCallback) | |
self.w.open() | |
def openSheetCallback(self, sender): | |
SheetDemo(self.w) | |
DummyWindowController() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment