Group

class vanilla.Group(posSize)

An invisible container for controls.

To add a control to a group, simply set it as an attribute of the group.:

from vanilla import *

class GroupDemo(object):

    def __init__(self):
        self.w = Window((150, 50))
        self.w.group = Group((10, 10, -10, -10))
        self.w.group.text = TextBox((0, 0, -0, -0),
                                "This is a group")
        self.w.open()

GroupDemo()

No special naming is required for the attributes. However, each attribute must have a unique name.

posSize Tuple of form (left, top, width, height) representing the position and size of the group.

getNSView()

Return the NSView that this object wraps.

enable(onOff)

Enable or disable the object. onOff should be a boolean.

getPosSize()

The position and size of the object as a tuple of form (left, top, width, height).

isVisible()

Return a bool indicting if the object is visible or not.

move(x, y)

Move the object by x units and y units.

resize(width, height)

Change the size of the object to width and height.

setPosSize(posSize)

Set the postion and size of the object.

posSize A tuple of form (left, top, width, height).

show(onOff)

Show or hide the object.

onOff A boolean value representing if the object should be shown or not.