12.2.1. TextBox

Last page update: November 23, 2011

Note

TextBox features:

12.2.1.1. definition

textbox([**kwargs])

12.2.1.2. description

Textbox is used to insert a text

12.2.1.3. attributes

textbox attributes:

  • constraints: TBC TODO
  • invalidMessage: tooltip text that appears when the content of the textbox is invalid
  • promptMessage: tooltip text that appears when the textbox is empty and on focus
  • required: define if the field is a required field or not. Default value is False
  • regExp: regular expression pattern to be used for validation. If this is used, don’t use regExpGen
  • regExpGen: TBC. If this is used, do not use regExp ???. Default value is None
  • tooltipPosition: define where Tooltip will appear. Default value is right

12.2.1.4. Examples

12.2.1.4.1. simple example

Let’s see a code example:

class GnrCustomWebPage(object):
    def main(self,root,**kwargs):
        root.div("Some simple textboxes.",font_size='.9em',text_align='justify')
        fb = root.formbuilder(datapath='test1',cols=2)
        fb.textbox(value='^.name',lbl='Name')
        fb.textbox(value='^.surname',lbl='Surname')
        fb.textbox(value='^.address',lbl='Address')
        fb.textbox(value='^.email',lbl='e-mail')

Table Of Contents

Previous topic

12. Textboxes

Next topic

12.2.2. CurrencyTextBox

This Page