示例#1
0
    def __init__(self, *args, **kw):
        """
        Shows a list of options, of which one may be selected. The ListBox has
        two special attributes: items, a sequence of items to display, and
        selection, the currently selected (as an index in the items sequence).

        The selection property will be automatically modified (as per the MVC
        mechanism) when the user makes a selection. This will also cause the
        ListBox to send a select and a defaultevent.
        """
        AbstractComponent.__init__(self, *args, **kw)
示例#2
0
    def __init__(self, *args, layout=None, **kw):
        """
        Frame is a component which can contain other components. Components
        are added to the Frame with the add method.

        `layout` is the :class:`manygui.LayoutManager` instance used for placing
        components in the Frame. It defaults to :class:`manygui.Placer`.
        """
        if layout is None:
            layout = Placer()
        self._contents = []
        AbstractComponent.__init__(self, *args, **kw)
        self._layout = None
        self.layout = layout
示例#3
0
 def _finish_creation(self): # FIXME: Hm...
     AbstractComponent._finish_creation(self)
示例#4
0
 def __init__(self, *args, **kwargs):
     """
     A Label is a simple component which displays a string of text. (Label
     can only handle one line of text.)
     """
     AbstractComponent.__init__(self, *args, **kwargs)
示例#5
0
 def __init__(self, *arg, **kw):
     AbstractComponent.__init__(self, *arg, **kw)
示例#6
0
 def destroy(self):
     while self._contents:
         self._contents[0].destroy()
     AbstractComponent.destroy(self)