Consultor Eletrônico



Kbase P25331: How to select entries in a LIST-ITEM-PAIRS combo box based o
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/16/2003
Status: Unverified

GOAL:

How to select entries in a LIST-ITEM-PAIRS combo box based on keystrokes when running in character mode

FIX:

The following code shows (generically) how to select an entry in a LIST-ITEM-PAIRS combo box based on keystrokes:

/* This Code Goes In The ANY-PRINTABLE Event Of The Combo Box */

DEFINE VARIABLE iLoop AS INTEGER NO-UNDO.
DEFINE VARIABLE iNumEntries AS INTEGER NO-UNDO.
DEFINE VARIABLE cList AS CHARACTER NO-UNDO.

ASSIGN cList = SELF:LIST-ITEM-PAIRS
iNumEntries = NUM-ENTRIES(cList).

DO iLoop = 1 TO iNumEntries BY 2:
IF ENTRY(iLoop,cList) BEGINS LAST-EVENT:FUNCTION THEN
DO:
/* May Need To Convert Right Side To Correct Data Type */
SELF:SCREEN-VALUE = ENTRY(iLoop + 1, cList).
RETURN.
END.
END.