Class: dbDataComboForm [Abstract]

Properties  Events  Methods    Index of Classes

Extends the functionality of the dbBasicComboForm to support the separation of description and database values

This is an abstract class and should never be used by a developer for object instantiation. While a developer could use this class for sub-classing, it is not encouraged.

Hierarchy

cObject
---cUIObject
------DfBaseObject
---------DfBaseWindow
------------DfBaseUIWindow
---------------DfBaseControl
------------------DfBaseList
---------------------DfBaseForm
------------------------DfBaseEntry
---------------------------DfBaseComboBoxEntry
------------------------------ComboEntry
---------------------------------dbBasicComboForm_
------------------------------------dbBasicComboForm
---------------------------------------dbDataComboForm
------------------------------------------dbComboFormDS

Library: Windows Application Class Library

Package: Dfdtcent.pkg

Description

dbDataComboForm is used to extend the functionality of the dbBasicComboForm to support the separation of description and database values. This class is intermediate. Its subclass, dbComboForm, should be used for instantiation.

Note:
A dbDataComboForm object is associated with a single data element which is assigned with the entry_item command. Each value in the dropdown lists a valid value for the entry item. The current value is displayed in the form. This class supports the separation of display value and database value. Each valid choice is defined with a data value (the value that is read and written to the database) and a description (the text value that is displayed in the form and the list). This separation is optional (the data value and description value may be the same).


Combo_Add_Item

Just like its superclass, the combo list is filled by calling the Combo_Fill_List procedure (which is called automatically). Each item is added to the list with the Combo_Add_Item message. Unlike its superclass, the combo_add_item in this class accepts two parameters: a description value and a data value.

procedure combo_fill_list
    Send Combo_Add_Item "FEDEX" "F" // description and code
    Send Combo_Add_Item "UPS"   "U" 
    Send Combo_Add_Item "COD"   "C" 
End_Procedure


Note:
When the dbComboForm is used in conjunction with a data dictionary, the list is filled automatically by the data dictionary.


Display Value and Database Value

The property Code_Display_Mode determines what is displayed. Valid modes are CB_Code_Display_Description (the default-displays the description), CB_Code_Display_Code (displays the code) and CB_Code_Display_Both (displays the code followed by the description).