Picklist Help Textbox_ Example

Before we get into a description of how to set up Picklist Help for a field, letís take a look at VPMís Picklist Help in action.

VPM Enterprise provides Picklist Help for fields on forms that (a) use Referential or Set validation and (b) are based on the VPM Enterprise Textbox_ or Combobox_ control classes. When a user of your application edits such a field on a form, (a) pressing F2, (b) right-clicking the field and selecting Picklist from the shortcut menu or (c) clicking the picklist icon to the right of the field displays a picklist of the valid entries for the field. If a combobox control is used, the list of valid entries can also be displayed by expanding the combo box. The valid entries are either (a) the primary key values in a Picklist table or (b) the values entered for Set validation. The user can select a value for the field from the picklist by double-clicking a value in the list or by highlighting a value and pressing enter.

For example, the Job field on the Job Status form (shown below) in the Sample Application illustrates Picklist Help for a Job Code field placed on a form with a textbox control based on the VPME Textbox_ control class.  The Job field also illustrates displaying a descriptive field from a Picklist table in lieu of the actual code field thatís being edited.

The Job Code field (POSCODE) in the DVSAEMAS.DBF table in the VPM Enterprise Sample Application uses Referential validation. The Picklist Cursor is a table (DVSACJBC.DBF in the COMPANY database) of valid Job Codes and related information, including a field that contains a Job Code Title, or code description.

In the Sample Application, Job Codes are six character alphanumeric codes. Jessica Andersonís Job Code is ď1358XXĒ. The ďBranch Mgr 1Ē text displayed in the Job text box on the Job Status form is the Job Code Title, or code description, contained in a field in the Job Code table record for Job 1358XX. We were able to display the Job Code Title instead of the Job Code itself by simply setting several properties of the Job Codeís textbox control when we created the Job Status form. Weíll teach you to do that later in this chapter.

Job Codes are entered and changed on the Job Status form by displaying Picklist Help and selecting a valid Job code. When the focus is in the Job Code field and you either (a) press F2, (b) right-click the field and select Picklist from the shortcut menu or (c) click the picklist icon, the Help Picklist shown below appears.

Picklist Help provides a grid for finding valid entries quickly and easily. The picklist behavior can best be described by describing the gridís properties.

Picklist Help Grid Properties

The properties of the Picklist Help grid include:

∑       Current Order Column: The column by which the grid is currently ordered is highlighted in light gray.

∑       Current Row: The selected row in the grid is highlighted in light gray.

∑       Sortable Column: A column which is sortable displays its header caption in the normal font. Clicking on a sortable columnís header changes the grid order to the index tag associated with that column. Clicking on a sortable columnís header repeatedly toggles the column order between ascending and descending - just like the Windows Explorer.

∑       Nonsortable Column: A column which is not sortable displays its header caption in italics.

∑       Searchable Column: A column which provides incremental search displays its cells in the normal font. When the focus is in a cell in a searchable column, you can begin an incremental search by simply pressing keys on the keyboard. The keys you press are shown in the column header. As you press keys, the selected record incrementally becomes the first record whose column cell value matches the keys pressed.

∑       Nonsearchable Column: A column which does not provide incremental search displays its cells in italics.

 

More:

Picklist Help Combobox_ Example