Control Class

The Control class enables you to define properties and methods that apply to all controls. As the Control class is an abstract subclass of the Window class, it inherits all of the properties and methods defined in that class. A control is a specialized child window that is resident on top of a form or another control. To create your own user-defined controls, subclass the BaseControl class (for details, see Chapter 5 of the JADE Developer’s Reference).

For details about testing controls on a form, see "Testing Tools and Control Identification", in the following subsection.

Some controls can be parents of other controls in the JADE Painter; for example, BaseControl, Frame, GroupBox, JadeDockBar, JadeDockContainer, JadeMask, Picture, Sheet, and StatusLine.

Controls have properties that determine aspects of their appearance (for example, position, size, and color), and aspects of their behavior (for example, whether they receive the focus). Controls can also respond to events initiated by the user or triggered by the system. For example, you could write logic in the click event of a control that would enable the user to indicate acceptance of a process by clicking it.

In addition to properties and events, you can use methods to manipulate controls from logic.

Use the move method of the Window class to change more that one of the left, top, width, or height properties for a form or control. As each change causes the control to resize, if the window is a container of other controls, potentially each control resizes each time the properties are set or the control is aligned to the form or control.

The move method ensures that one resize only occurs. For example, if you individually change the left, top, width, or height properties for a folder, the folder resizes four times. It then resizes the sheets four times, which can resize the contents, and so on.

Some Control instance properties have no meaning for certain controls, but are defined for other reasons; for example, as a scroll bar control does not have any text, the font properties have no relevance.

When printing the text of a control or displaying the text on a form, an ampersand character (&) is displayed as an underscore to the next character of the text string, with the following exceptions.

For controls that display an ampersand character (&) as an underscore, two ampersand characters (&&) are printed or displayed as a single ampersand character; for example, &&Print is printed or displayed as &Print.

For details about printing a background picture over which is drawn the report itself, see "Layering Print Output", under the Printer class "Defining Your JADE Report Layouts", in Chapter 1.

User-defined subclassed controls are not supported on forms defined as Web pages, and are ignored when HTML is generated.

When an event method defined at the Control class is deleted, the user is warned of this. If the deletion is confirmed, the event methods that correspond to this control event are also deleted. Renaming a control event method automatically renames all event implementations.

For details about applying skins to controls in your application, see "JadeSkinApplication Class" and "JadeSkinControl Class and Subclasses", in Volume 2.

For a summary of the constants, properties, methods, and event defined in the Control class, see "Control Class Constants", "Control Properties", "Control Methods", and "Control Event", in the following subsections. For details about the support of mouse wheel requests to scroll up, down, or across a control, see "Window Class", earlier in this document.

Window

ActiveXControl, BaseControl, BrowseButtons, Button, CheckBox, ComboBox, Folder, Frame, GroupBox, JadeDockBase, JadeDotNetVisualComponent, JadeEditMask, JadeRichText, JadeTextEdit, JadeXamlControl, Label, ListBox, MultiMedia, Ocx, OleControl, OptionButton, Picture, ScrollBar, StatusLine, Table, TextBox, user-defined control classes