Esempio n. 1
0
 def __init__(self, **kwargs):
     if self.data_model is None:
         kwargs.setdefault('data_model', RecycleDataModel())
     if self.view_adapter is None:
         kwargs.setdefault('view_adapter', RecycleDataAdapter())
     kwargs.setdefault('cols', 1)
     super(RecycleButtons, self).__init__(**kwargs)
     fbind = self.fbind
     fbind('size', self.refresh_from_viewport)
     fbind('pos', self.refresh_from_viewport)
     self.refresh_from_data()
Esempio n. 2
0
    def __init__(self, **kwargs):
        if self.data_model is None:
            kwargs.setdefault('data_model', RecycleDataModel())
        if self.view_adapter is None:
            kwargs.setdefault('view_adapter', RecycleDataAdapter())
        super(RecycleView, self).__init__(**kwargs)

        fbind = self.fbind
        fbind('scroll_x', self.refresh_from_viewport)
        fbind('scroll_y', self.refresh_from_viewport)
        fbind('size', self.refresh_from_viewport)
        self.refresh_from_data()