cObject
---cUIObject
------DfBaseObject
---------DfBaseWindow
------------DfBaseUIWindow
---------------DfBaseControl
------------------DfBaseList
---------------------DfBaseForm
------------------------DfBaseComboBox
------------------------DfBaseEntry
------------------------DfBaseFormList
------------------------DfBasetabDialog
------------------------DfBasetoolbar
------------------------Form
DfBaseForm is a superclass for classes supporting form data entry. This is a private class and is not intended for instantiation or sub-classing. It is used as the basis for single item entry (Form) and multiple item row entry (Grid). It is also the ancestor class for database aware data entry - both single item (Entry) and multiple item (EntryList).
The DfBaseForm class is designed to be the basis for more-capable data-entry classes. It is descended from the DfBaseList class and therefore inherits all of the properties and capabilities of the DfBaseList class. Its primary difference is that it sets each item's entry_state property to true. This allows keyboard entry when the object has the focus.
A number of important behaviors are added to this runtime class which is supported through the interface listed below.
The contents of a form is stored in its value property. When a Form-class object has the focus it will accept data from the keyboard directly into the value of the item. The value can also be directly changed and retrieved with the get and set value messages (get/set value item x to val). Any time the contents of a Form is changed (through keyboard or the set value message) the event message onChange is sent. Also, if users enter any change to the window, the item_changed_state and the changed_state of the object are set true.
The maximum length of a form's value is specified by the form_margin property. This property and a form's value may be longer than the actual width of the form's object. When this occurs, the text within a form scrolls horizontally.
This class supports input and display masking for a variety of data types (text, numeric, currency, and dates). The type of masking used is determined by the object's form_datatype (which supports both masked and non-masked types) and the object's form_mask.
Some masked forms support different formats for display and edit. When a masked form is displayed but is not the focus, the masked value is displayed with full format characters. For example, a currency mask might display with a currency symbol, decimal separators, and special symbols designating negative values. When this form takes the focus, the special symbols are all removed, since they cannot really be edited. When the focus is lost, the form is again reformatted.
The masking support provided here is low-level. Higher-level classes provide additional messages to make it easier to define and maintain masks. At the highest level, masks are defined in data dictionaries and applied to fields. All forms using those fields will acquire the required mask.
The DfBaseForm class supports the ability to embed a button within a form. This is used by subclasses to support prompt buttons and spin buttons. The interface defined here is a low-level interface and should not be needed in normal programs. When spin buttons and prompt buttons are required, you are encouraged to use the higher-level classes that directly support them (SpinForm, dbSpinForm, dbForm).