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()
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()