Last page update: November 23, 2011
Note
TextBox features:
- Type: Dojo-improved widget
- Common attributes: check the common attributes section
- textbox([**kwargs])
Textbox is used to insert a text
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
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')