| |
Methods defined here:
- __init__(self, name='', label='', attributes={}, languageStandard='XHTML')
- The constructor basically just sets up a bunch of containers
the label is a string that is used by some classes, but not others, mainly for things
like button labels; attributes is a dictionary of parameters that will be added to
the HTML tag; languageStandard is whether you want HTML or XHTML tags returned
- addAttributes(self, attributes)
- Public method for adding tag attributes; merges in a dictionary of tag attributes
- addClass(self, klass)
- Public method for appending a CSS class name to this tag; expects a string
- addStyle(self, dict)
- Public method for adding a style attribute to a tag; takes a dictionary;
the key is the directive, the value is the parameter.
Duplicate key names override their predecessor.
Input like this:
{ 'background-color': 'rgb(255,255,255)',
'font-size: 11px' }
( trailing semicolon can be used, or not )
set a key to None or empty string to remove it from the set
- attributes(self)
- Returns a dictionary of field element attributes
- clearClasses(self)
- removes all CSS classes from the tag
- dump(self)
- Quick and dirty method that returns the label and tag in that order
- id(self)
- returns the dom id attribute of this htmlElement
- label(self)
- Generic label parameter access method
- languageStandard(self)
- Generic parameter access method
- name(self)
- Generic name parameter access method
- setAccessKey(self, key)
- Public method for setting the tab index of a field... pass a single character string (a letter)
- setID(self, string)
- Public utility method to surgically override the id tag attribute
- setTabIndex(self, num)
- Public method for setting the tab index of a field... pass an integer
- tag(self)
- value(self)
- Generic field value access method
|