vanilla
vanilla copied to clipboard
A Pythonic wrapper around Cocoa.
example: ```python import vanilla import AppKit def callback(sender): print("hit") button = vanilla.Button((0, 0, 100, 22), "A Button!", callback=callback, sizeStyle="small") button.getNSButton().setFrame_(((0, 0), (150, 22))) w = vanilla.Window((400, 400)) titlebarController = AppKit.NSTitlebarAccessoryViewController.alloc().init()...
Using this example from de Vanilla documentation: ``` from vanilla import Window, RadioGroup class RadioGroupDemo: def __init__(self): self.w = Window((100, 60)) self.w.radioGroup = RadioGroup((10, 10, -10, 40), ["Option 1", "Option...
vanilla.Tabs are not working correctly on the latest mac OS Ventura. All tabs except the first one, are bugged. See with this example : ``` from vanilla import Window, Tabs,...
Even though the correct kind of (straight) quotes are used in the [docstrings](https://github.com/robotools/vanilla/blob/873d9832da66fc085591beea4f04c998b4dd04c1/Lib/vanilla/vanillaWindows.py#L535-L552), the [rendered documentation](https://vanilla.robotools.dev/en/latest/objects/Window.html#vanilla.Window.bind) changes them to “typographic” ones. This makes copying from the documentation a bit more...
Using fillColor or borderColor in Box Object make app crash. (Tested in drawBot and Glyphs3 Macro Panel) ``` from vanilla import Window, Box, TextBox class BoxDemo: def __init__(self): self.w =...
https://github.com/robotools/vanilla/issues/142#issuecomment-836598669
Maybe I'm doing something wrong, but it seems like the vertical line is behaving weirdly. It is not vertical at all. Here is my code: ```Python from AppKit import NSObject...
This should have the same alignment options as TextBox. In the meantime, here's a workaround for @LettError: ```python import AppKit import vanilla class RightAlignEditTextList2Cell(vanilla.EditTextList2Cell): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs)...
Scrollers are always visible.  ``` from AppKit import NSView, NSColor, NSRectFill from vanilla import Window, ScrollView class DemoView(NSView): def drawRect_(self, rect): NSColor.redColor().set() NSRectFill(self.bounds()) class ScrollViewDemo: def __init__(self): self.w =...
Minimal example: ``` class SimpleAppWindow(object): def __init__(self): self.w = vanilla.Window((250, 120), "Simple App Window", closable=False) self.w.gridview = vanilla.GridView((10, 10, -10, 70), [ [vanilla.PopUpButton("auto", ["I should be removed"])], [vanilla.PopUpButton("auto", ["I should...