Exemple #1
0
    def __init__(self, parent, id, model, label=None, cache=True, **kw):

        # Base-class constructor.
        wxScrolledPanel.__init__(self, parent, id, **kw)
        self.SetupScrolling()

        # The switcher model that we are a panel for.
        self.model = model

        # Should we cache pages as we create them?
        self.cache = cache

        # The page cache (if caching was requested).
        self._page_cache = {}

        # The currently displayed page.
        self.current = None

        # Create the widget!
        self._create_widget(model, label)

        # Listen for when the selected item in the model is changed.
        model.on_trait_change(self._on_selected_changed, 'selected')

        return
Exemple #2
0
    def __init__(self, parent, id, model, label=None, cache=True, **kw):

        # Base-class constructor.
        wxScrolledPanel.__init__(self, parent, id, **kw)
        self.SetupScrolling()

        # The switcher model that we are a panel for.
        self.model = model

        # Should we cache pages as we create them?
        self.cache = cache

        # The page cache (if caching was requested).
        self._page_cache = {}

        # The currently displayed page.
        self.current = None

        # Create the widget!
        self._create_widget(model, label)

        # Listen for when the selected item in the model is changed.
        model.on_trait_change(self._on_selected_changed, 'selected')

        return
Exemple #3
0
    def __init__(self, parent, wxid, **kw):
        """ Creates a new pager. """

        # Base-class constructor.
        wxScrolledPanel.__init__(self, parent, wxid, **kw)
        self.SetupScrolling()

        # The pages in the pager!
        self._pages = {} # { str name : wx.Window page }

        # The page that is currently displayed.
        self._current_page = None
        
        # Create the widget!
        self._create_widget()

        return
Exemple #4
0
    def __init__(self, parent, wxid, **kw):
        """ Creates a new pager. """

        # Base-class constructor.
        wxScrolledPanel.__init__(self, parent, wxid, **kw)
        self.SetupScrolling()

        # The pages in the pager!
        self._pages = {}  # { str name : wx.Window page }

        # The page that is currently displayed.
        self._current_page = None

        # Create the widget!
        self._create_widget()

        return