Last page update: November 10, 2011
Note
summary of the component requirements:
It is a standard component.
It is a passive component. Its py_requires is:
py_requires='public:Public'
- periodCombo(self, fb, period_store=None, value=None, lbl=None, dflt=None **kwargs)¶
The periodCombo is a FilteringSelect that allows to choose a time interval
Parameters:
- fb - MANDATORY. The formbuilder to which you have to append the periodCombo
- period_store - the store path. Default value is .period
- value - the path of the value (more information in the datapath section). Default value is ^.period_input
- lbl - the periodCombo label. Default value is Period
As you can see in the following image, there are many preset period (taken from the decodeDatePeriod() method):
![]()
where:
- 2011 is the actual year showed in a numerical string
- 2010 is the last year showed in a numerical string
Here is a simple example:
# -*- coding: UTF-8 -*- class GnrCustomWebPage(object): py_requires = """public:Public""" def main(self, root, **kwargs): pane = root.contentPane(height='200px',datapath='root_example') # remember to put a datapath! fb = pane.formbuilder(cols=2) self.periodCombo(fb,lbl='!!Period',period_store='.period') fb.div(value='^.period.period_string', _class='period',font_size='.9em',font_style='italic')