Important: The information in this document is obsolete and should not be used for new development.
<Checkbox>
You can use the <Checkbox> command to place a checkbox on a panel. You must specify the button's title and its default state (on or off). You can optionally specify a sequence to insert into the new sequence, based on the checkbox's state. You can also specify an anchor point for the checkbox and its title font.
<Checkbox> checkBoxTitle, checkBoxState [, seqTrue] [, seqFalse] [, checkBoxAnchor] [, checkBoxFont]
- checkBoxTitle
- A string specifying the checkbox's title.
- checkBoxState
- A Boolean constant indicating the default state of the checkbox. Specify
TRUE
to set the checkbox to on, specifyFALSE
to set the checkbox to off. Any number of checkboxes in a set can have their default state set toTRUE
.- seqTrue
- The name of the sequence to insert if the checkbox is on (
TRUE
). This parameter is optional.- seqFalse
- The name of the sequence to insert if the checkbox is off (
FALSE
). You usually do not provide this parameter if you provide the seqTrue parameter. This parameter is optional.- checkBoxAnchor
- A point that indicates the anchor point of the checkbox.To describe a specific point, use the
Point
function. This parameter is optional.- checkBoxFont
- A constant specifying the font of the checkbox's title. You can use either of these constants to specify the corresponding font:
APPLEGUIDE
- Specifies 10-point Espy Serif.
SYSTEM
- Specifies the system font of the current script system. For example, for Roman script systems, indicates 12-point Chicago.
- This parameter is optional; if you omit this parameter, Apple Guide displays the checkbox title in the system font.
DESCRIPTION
The <Checkbox> command places a checkbox with the specified title on a panel. If you specify the seqTrue or seqFalse parameter, Apple Guide inserts the specified sequence into the current sequence, according to the setting of the checkbox.You can easily accomplish sequence branching by using these two parameters. When you use this method, Apple Guide displays the panel containing any checkboxes; when the user navigates to another panel, Apple Guide inserts one or more named sequences according to the current setting of the checkboxes. Alternatively, you can explicitly check the settings of the checkboxes yourself, using the <If> command and the built-in functioncheckBoxState
.Checkboxes appear inline with the surrounding text and are justified within the current format unless you specify an optional anchor point.
Note that the titles of checkboxes should reflect two clearly opposite states, because a checkbox should allow a user to turn a particular setting on or off.
EXAMPLES
<Define Panel> "Index Choices" Index choices: <Checkbox> "Include See Also entries", TRUE, \xAC "How do I create See Also entries?" <Checkbox> "Include starting and ending page ranges", FALSE, \xAC "How do I create page ranges for an index entry?" <End Panel> #alternative method of checking settings of checkboxes <Define Panel> "Index Choices 2" Index choices: <Checkbox> "Include See Also entries", TRUE <Checkbox> "Include starting and ending page ranges", FALSE <End Panel> <Define Sequence> "How do I create an index?" <Panel> "Index Choices 2" <If> checkBoxState("Include See Also entries", \xAC "Index Choices 2") <Panel> "How do I create See Also entries?" <End if> <If> checkBoxState("Include starting and ending page ranges", \xAC "Index Choices 2") <Panel> "How do I create page ranges for an index entry?" <End if> <End Sequence>SEE ALSO
For information on creating radio buttons, see the description of the <Radio Button> command on page 10-64. For information on other buttons, see the description of the <Standard Button> and <3D Button> commands on page 10-57 and page 10-60, respectively.