Class: dbEdit [Obsolete]

Properties  Events  Methods    Index of Classes

Supports data entry for memo fields or sequential ASCII files from DEOs

Hierarchy

cObject
---cUIObject
------DfBaseObject
---------DfBaseWindow
------------DfBaseUIWindow
---------------DfBaseControl
------------------DfBaseEdit
---------------------Edit
------------------------dbEdit_
---------------------------dbEditDS
------------------------------dbEdit

Library: Windows Application Class Library

Package: Dftxtwin.pkg

Mixins: Extended_DEO_Status_Help_Mixin Extended_DEO_Status_Help_Tooltip_Mixin

Description

This class is obsolete. It has been replaced with the cDbTextEdit class.




dbEdit is used to support data entry for memo fields or sequential ASCII files from DEOs.

Sample

Object Customer_Comments is a dbEdit 
    Entry_item Customer.Comments
    Set Location TO 147 5
    Set Size     TO 48 305
    Set Label to "Comments:"
End_Object



Syntax

use dftxtwin
 
Object oObecjtName is a dbEdit
    Set Size to height width
    Set Location to Row Column
    entry_item file.field
 
    Set Label to text
    Set Label_Justification_Mode to mode
    Set Label_Row_Offset to Num
    Set Label_Col_Offset to Num
 
    set Wrap_State to true|false
    set Enabled_State to true|false
    set Read_Only_State to true|false
 
    Procedure onChange
        :
    End_Procedure
 
    Procedure onSetFocus
        :
    End_Procedure
 
    Procedure onKillFocus
        :
    End_Procedure
 
end_object


Of Special Note

Although dbEdits are complex objects containing many messages, their actual usage is quite simple. When this class is used in conjunction with data dictionaries, very few properties need to be set within this object. Usually a dbEdit object will contain a label, a size and location setting, and an entry_item statement.

DbEdits should always be placed inside a dbView object or a data-aware container (dbContainer3d, dbGroup, dbTabPage, dbTabView). The DataDictionary used by the edit should be above the object and inside the entry-view container.

Data-Entry Object

The dbEdit is a data-entry object (DEO). A DEO object is an object, whose native capbilties (in this case a edit) is augmented to support data-aware behaviors. These behaviors include:



These data-aware "skills" are added to all DEO classes through a series of mix-in classes. The message are listed here but documented in the mix-in classes. You are encouraged to study the documentation of the mix-in classes. Information provided in the documentation of these classes may be applied to all DEO classes (all db... classes). Those classes are: Nesting_Mixin, Navigate_Mixin, Verify_Mixin, Server_Mixin, Find_Edit_Mixin, and DEO_Delegate_Mixin.

Using Data Dictionaries

When this object's server is a data dictionary, this object will acquire a great deal of "knowledge" from the server. It will "know" data types, status help, and much more regarding the data file and its fields. If you use data sets, these settings will all require setting properties. While possible, this requires a great deal more work and greatly increases the chances of errors and inconsistencies.

Labels

Edits often require an associated description or label. With edits, they most often appear above the edit object in the left corner. Labels are supported with the label message. The default location and justification mode of labels can be controlled with the properties label_col_offset, label_row_offset and label_justification_mode. If you set auto_locate_state true, label values will be drawn from field properties in the DDO, overriding the label value, if any.

The Server

All dbEdit objects should always be connected to a server (a data-dictionary object). While the server can be explicitly set within the object, it will usually be set within a parent (or other ancestor) container object.

Maximum Length of a dbEdit

When a dbEdit object is created, the maximum number of characters will be set automatically by checking the allowed length of the file.field attached to this object in the entry_item statement.

Accelerator Keys

dbEdit defines the kprompt and kzoom keys to send the prompt and zoom message. These procedures, however, have no action by default. If prompting/zooming is desired on a text_window, the action must be defined (by the program) by overriding the prompt and/or zoom messages.

Name Message Sent
kbegin_of_data beginning_of_data
kbegin_of_panel beginning_of_panel
kcancel request_cancel
kclear request_clear
kclear_all request_clear_all
kdelete_record request_delete
kend_of_data end_of_data
kend_of_panel end_of_panel
kexit_function exit_function
kfind find_ge
kfind_next find_next
kfind_previous find_previous
ksave_record request_save
ksuper_find superfind
ksuper_find_next superfind_next
ksuper_find_previous superfind_previous
kswitch switch
kswitch_back switch_back
kswitch_panel switch_next_group
kswitch_panel_back switch_prior_group