Custom Classes |
Among the most powerful and useful features in dBASE is the ability to create custom classes and custom components. You have already seen how a custom data module can be created and used with dBASE Plus, and we will explore the use of custom forms in the next Session. In this Session we will explore custom components. A custom component is based on one or more of the standard components that are built into dBASE. A custom entryfield, for example, is derived from the standard entryfield, but with it you can over ride the standard entryfields background color with your own color. You may also want to add a custom onGotFocus event. When you use the new custom entryfield in an application, all the entryfields will have the same background color and the same onGotFocus event. The purpose of the current Session is to learn how to create and use our own custom components.
Readings
Working
with Custom Classes
Working
with the Form Controls
Working
with the Grid Control
Tutorial Project
Phase
IV: Creating Custom Components
In this Phase of the Tutorial, you create, from scratch, all the custom controls that are used in the Tutorial application. You will, for example, create a custom EnteryField, Pushbutton, and TextLabel. You will also create a complex object when you design a custom toolbar.
Hands-on Project
Custom
classes used in the Hands-on Project
For the Hands-on Project we will re-use the custom controls that were created in the Tutorial project. We will, however, modify some of the control properties so as to change the behavior of Pet Clinic application.