Documentation
Publicon
Reference
Preferences
Formatting Options
...Specific Box Options
ButtonBoxOptions
{...}
ButtonStyle
• ButtonStyle is an option for cells that determines the default properties for the button such as the type of action it performs and the details of its appearance.
• Typical button styles defined in the default style sheet are:
• The properties specified by a button style can affect both the appearance and action of a button.
• The properties can be overridden by explicit settings for
ButtonBox options.
• See also:
ButtonFrame,
ButtonFunction.
ButtonFunction
• ButtonFunction is an option for cells that determines the function to execute when an active button is clicked.
• The default setting for ButtonFunction causes the button to paste its contents in your current notebook selection.
• ButtonFunction is used only when the option Active is set to True, either for the button or for the cell the button is in.
• With ButtonFunction ⧴ f, the first argument supplied to f is specified by the setting for ButtonSource and the second argument is specified by the setting for ButtonData.
• Standard Publicon precedence rules require parentheses, as in ButtonFunction ⧴ (body &).
• Settings for ButtonFunction are often inherited from button styles via the ButtonStyle option.
• See also: ButtonEvaluator, ButtonNote.
ButtonEvaluator
• ButtonEvaluator is an option for cells that determines where the expression constructed from ButtonFunction is sent for evaluation.
• The default setting is ButtonEvaluator
None.
• Possible settings are as follows.
• With
ButtonEvaluator
Automatic, the expression to be evaluated can contain any
Publicon expressions.
• With
ButtonEvaluator
None, the expression can contain only the specific notebook commands supported by the front end. All these commands are in the context
FrontEnd`. Expressions intended for processing only by the front end should be wrapped with
FrontEndExecute.
• See also:
ButtonFunction,
ButtonStyle.
ButtonSource
• ButtonSource is an option for cells that determines the first argument given to the ButtonFunction when the button is active and is clicked.
• The default is ButtonSource
Automatic.
• Possible settings are as follows.
• See also:
ButtonFunction,
ButtonData,
ButtonStyle.
ButtonData
• ButtonData is an option for cells that determines the second argument given to ButtonFunction when the button is active and is clicked.
• The default is ButtonData
Null.
• ButtonData provides a convenient way to associate additional data with a button without affecting the display of the button.
• See also: ButtonSource, ButtonNote, ButtonStyle.
ButtonNote
• ButtonNote is an option for cells that determines what is displayed in the status line of the current notebook window when the button is active and the cursor is placed on top of the button.
• By assigning a value to ButtonNote, you can provide a visual cue to indicate the function of the button. For example, in the Complete Characters palette, each button has the fullname of the character as the setting for ButtonNote.
• With the default setting ButtonNote
None, no text is displayed in the status line.
• Any expression can be specified as the setting for ButtonNote, though most windows will only allow a single character height to be displayed.
• ButtonNote can be used to display keyboard equivalents for buttons in a palette.
• See also: ButtonData, ButtonFunction, ButtonStyle.
ButtonFrame
• ButtonFrame is an option for cells that determines the type of frame to display around a button.
• Typical settings supported include the following.
• Button frames generated by
ButtonFrame are set up to follow the conventions for particular computer systems.
• A button with a particular setting for
ButtonFrame may look slightly different on different computer systems.
• See also:
ButtonStyle,
WindowFrame.
Background
• Background is an option for cells that determines the background color of a button.
• Background can be specified using either the GrayLevel or RGBColor function. It can also be specified using Hue or CMYKColor, but in these cases the color is automatically converted to RGBColor by the front end.
ButtonMargins
• ButtonMargins is an option for cells that determines how much space in printer's points is left around the contents of a button when it is displayed.
• The default setting is ButtonMargins
3. This corresponds to a margin of 3 points, that is
of an inch.
• See also: ButtonExpandable, ButtonMinHeight.
ButtonMinHeight
• ButtonMinHeight is an option for cells that determines the minimum total height in units of font size that should be allowed for the button.
• The default setting ButtonMinHeight
1, forces a button to have a total height that at least accommodates all the characters in the current font.
• ButtonMinHeight
0 reduces the total height of a button as much as possible, allowing buttons containing different characters, such as x and X, to be different heights.
• See also: ButtonMargins, ButtonExpandable.
ButtonExpandable
• ButtonExpandable is an option for cells that determines if the button should expand to fill any grid box position in which it appears.
• The default setting is ButtonExpandable
True.
• This setting is usually used for all buttons that appear in palettes.
• With ButtonExpandable
False the size of a button is determined only by its contents, independent of its environment.
• With ButtonExpandable
False, gutters will often be left between buttons in a grid box.
• See also: ButtonMargins, ButtonMinHeight, TextJustification.
Active
• Active is an option for cells that determines if a button should be active.
• With Active
False, the contents of a button can be edited.
• With Active
True, a button will perform an action when it is clicked.
• Active cells are indicated by an A in their cell bracket.
• See also: ButtonStyle, Evaluator.