4.6. periodCombo

Last page update: November 10, 2011

Note

summary of the component requirements:

4.6.1. definition

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

4.6.2. description

As you can see in the following image, there are many preset period (taken from the decodeDatePeriod() method):

../../_images/periodcombo3.png

where:

  • 2011 is the actual year showed in a numerical string
  • 2010 is the last year showed in a numerical string

4.6.3. Examples

4.6.3.1. simple example

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

Table Of Contents

Previous topic

4.5. linkerField

Next topic

4.7. selectionBrowser

This Page