def __init__(self, parent): wx.Panel.__init__(self, parent) # Member variables. self.filters = [] self.filter_list = FilterList(self) # create sizer for the object panel. self.sizer = wx.BoxSizer(wx.HORIZONTAL) self.sizer.Add(self.filter_list, 1, wx.EXPAND) self.SetSizer(self.sizer)
def __init__(self, parent): wx.Panel.__init__(self, parent) # Member variables. self.filters = [] self.filter_list = FilterList(self) # create sizer for the object panel. self.sizer=wx.BoxSizer(wx.HORIZONTAL) self.sizer.Add(self.filter_list, 1, wx.EXPAND) self.SetSizer(self.sizer)
class FilterPanel(wx.Panel): """ Panel for the filters. """ def __init__(self, parent): wx.Panel.__init__(self, parent) # Member variables. self.filters = [] self.filter_list = FilterList(self) # create sizer for the object panel. self.sizer = wx.BoxSizer(wx.HORIZONTAL) self.sizer.Add(self.filter_list, 1, wx.EXPAND) self.SetSizer(self.sizer) def add_filter(self, filter): # add the filter to service layer. serviceLayer.add_filter(filter) # notify filter_list that he needs to reload. self.filter_list.reload_data()
class FilterPanel(wx.Panel): """ Panel for the filters. """ def __init__(self, parent): wx.Panel.__init__(self, parent) # Member variables. self.filters = [] self.filter_list = FilterList(self) # create sizer for the object panel. self.sizer=wx.BoxSizer(wx.HORIZONTAL) self.sizer.Add(self.filter_list, 1, wx.EXPAND) self.SetSizer(self.sizer) def add_filter(self, filter): # add the filter to service layer. serviceLayer.add_filter( filter ) # notify filter_list that he needs to reload. self.filter_list.reload_data()