label (option)Added by IBM on August 8, 2013 | Version 1 (Original)
|Specifies a text label for an item.
The label usually appears before the item and aligned with its left margin. For popup items, the label appears inside the item when no selection has been made.
Table 1. label parameters
|label text||string||The text of the label.|
Available in cell, check, checkgroup, combobox, field, list, pane, popup, radio, radiogroup, slider, spacer, page global, form global
Example This sample defines a typical label.
<label>Student Registration Form</label>
If an item contains both a label option and an xforms:label option, the XFDL label option takes precedence.
The label defined in a label option has a transparent background by default. To display a particular color behind the label, set the labelbgcolor option.
If used in the page global, the label option sets the title of the page as it appears in the title bar of the window displaying the form. If used in the form global, the label option sets the default title for all pages.
Multiple line labels require a carriage return in the code where you want it to appear in the label. For example:
- XFDL: none
- XForms: the value of the xforms:label option.
If a bidirectional language is used, the label text direction is consistent with the item orientation.
Note that not all items allows multi-line labels.
<label>This label spans
If a bidirectional language is used, the label justification is also consistent with the item orientation.
- In a Left-To-Right (ltr) orientation, the label text direction is Right-To-Right.
- In a Right-To-Left (rtl) orientation, the label text direction is Left-To-Left.
- If your checkgroup or radiogroup has a Left-To-Right (lrt) orientation, then the label appears to the right of each check or radio item.
- If your checkgroup or radiogroup has an Right-To-Left (rtl) orientation, then the label appears to the left of each check or radio item.