Class Button |
# This is the parent class of the button classes, including checkboxes. A {Button} produces and {Event} of code {0} when the button is depressed, and code {1} when it is released. By default, when a button holds the keyboard focus a dashed line appears just within the button. Then, when return is pressed an event of code {2} is generated. The method {_Dialog.set_initial_focus()} can be used to have the button have the focus when the dialog is first displayed. Buttons also repeatedly produce an event of -1 whilst they are held down, rather like a repeating keyboard press. The delay between the initial repeat event and subsequent repeat events is set in the parent dialog (see above).
Details |
Constructor |
Methods: |
# Set the status to unchecked.
# Set the image (if any) to the given string, which should be in Icon image format. @param x The image
# Set the up/down images (if any) to the strings provided, which should be in Icon image format. The two images must have the same dimensions. @param x The up image @param y The down image
# Set the status to checked.
# Set the label of the button, if any. @param x The label
# Invoking this method disables the keyboard control over the button described above. No dashed line will ever appear in the button display and return will have no effect on the button even if it has the focus.
# Toggle the checked status of the button. This method, and the following two methods, may be inappropriate for non-toggle styles of button.
Fields: |