Example #1
0
    def __init__(self, parent=aspect2dp, **kw):
        """__init__(self)
        FeatureBrowser constructor: create a scrolling list of features
        """
        assert PythonUtil.sameElements(Pages.keys(), PageOrder)

        self.parent = parent

        optiondefs = (
            ('parent', self.parent, None),
            ('relief', None, None),
            ('numItemsVisible', 1, None),
            ('items', [], None),
        )

        # Merge keyword options with default options
        self.defineoptions(kw, optiondefs)
        # Initialize superclasses
        DirectScrolledList.__init__(self, parent)
        # We'll scroll using the arrow keys on the keyboard
        self.incButton.hide()
        self.decButton.hide()
        self.initialiseoptions(FeatureBrowser)