Selection list - dynamically set intial

Kladkul

Member
Is there a way to dynamically set the initial value of a selection list?

I have a screen that I am developing and the selection list I am using has different values depending on what is passed in but no matter what I want to select the 1st value in the selection box once it's been populated. I can do that with SCROLL-TO-ITEM but that does not highlight the first record in the list.

Does anyone know how to achieve this?
 

mrobles

Member
1.- Make a selection list (list-item-pairs)
2.- use this code in a button
DEF VAR datos AS CHAR.
datos = 'A,1,B,2,C,3,D,4,E,5'. /* Fill your values" */

DO WITH FRAME default-frame.
LST:LIST-ITEM-PAIRS = datos.
LST = '1'.
DISPLAY LST.
END.

The '1' is the 1 that follows the 'A' in the data
 

RealHeavyDude

Well-Known Member
Haven't done much with selection lists lately ...

But try to set the SCREEN-VALUE of the selection list.

HTH, RealHeavyDude.
 
Top