fields[, flags=0]) |
(label, type[, value])
where
label is a Unicode string
type is one of the following strings:
'text'
, 'number'
, 'date'
, 'time'
, 'combo'
or 'float'
value, depending on type: Unicode string, numeric, float (seconds
since Unix epoch rounded down to the nearest local midnight), float (seconds
since local midnight), ([choice_label ...], index)
of float. For
'float'
type the initial value setting might not be shown in the
UI.
Form can also be configured and populated after construction. The configuration flags are visible as an attribute. Form implements the list protocol that can be used for setting the form fields, as well as obtaining their values after the dialog has been executed.
Instances of Form type have the following attributes:
(title, callback)
pairs, where
each pair describes an item in the form's menu bar that is active while the
dialog is being executed. title (Unicode) is the name of
the item and callback the associated callable object.
True
, the
candidate list is set as the new contents of the form. Otherwise, the form
UI is reset to reflect the field list contained in Form object.
Instances of Form type have the following methods:
) |
index, field_descriptor) |
) |
) |
The subscript notation f[i]
can be used to access or modify the
i-th element of the form f
. Same limitations as discussed above
in the context of the flag FFormAutoFormEdit apply to
modifying a form while it is executing. The ability to change the
schema of a form while it is executing is an experimental feature.
See About this document... for information on suggesting changes.