Created
August 7, 2014 18:54
-
-
Save okay-type/9127e72b8b77ef8a4e36 to your computer and use it in GitHub Desktop.
Making a window with a color box in RoboFont with vanilla
This file contains 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 Window, Box | |
from defconAppKit.windows.baseWindow import BaseWindowController | |
from AppKit import NSColor, NSView, NSRectFill | |
class BigBox(BaseWindowController): | |
def __init__(self): | |
## create window | |
self.w = Window((720, 600), "color box", minSize=(72, 86)) | |
## add a vanilla.Box | |
self.w.bg = Box((10, 10, -10, -10)) | |
## make the box red | |
### | |
## this part isn't working | |
## how should I be doing it? | |
## | |
self.w.bg._nsObject.setBackgroundColor_(NSColor.redColor()) | |
self.w.open() | |
BigBox() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment