The class of the cancel-button control. A subclass of button.
Control
Instance of the cancel-button class. This control is typically used to cancel an action in a modal dialog using return-nil-from-pop-up-dialog. Cancel buttons intercept the ESC key as a mouse click.
Usually this type of control has the name CANCEL, but you can change the title property to anything you like.
Adding a cancel-button control to your form
Click the cancel-button tool on the Component toolbar. Move the mouse cursor to the part of the form where you want to place the control, and click again. The control will appear with colored resizing handles.
Controls can only be resized and moved on forms during the design stage; the size and location of everything is fixed on a running form.
Resize the control by clicking the mouse cursor and dragging one of the handles to the new size-point. Release the mouse key when you are satisfied with the new size.
Move the control by clicking anywhere on it except a resizing handle and dragging it to a new location on the form. Release the mouse key when you are ready to place the control.
Notes
It is an error to place more than one cancel-button on a dialog.
This button doesn't stay pressed in when clicked. It gives a little jump and then returns to its resting state.
Creating an instance of a cancel-button control
This call to make-instance returns an instance of a cancel-button. Properties can be initialization keyword arguments (the keyword has the same name as the property, with a prepended colon, e.g. :width). Additional arguments could be provided. Their absence indicates the default value will be used.
(make-instance 'cancel-button :font (make-font-ex nil "MS Sans Serif" 11 nil) :left 189 :name :cancel-button-1 :top 146)
See About how to get sample code for creating controls in cgide.htm, which explains how to use the IDE to create such code.
Common Graphics and IDE documentation is described in About Common Graphics and IDE documentation in cgide.htm.
The documentation is described in introduction.htm and the index is in index.htm.
Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.
Created 2000.10.5.