Help With DCCOMBOBOX
Posted: Mon Jun 18, 2012 6:37 pm
I am trying to make an array used in DCCOMBOBOX dependant on a DCGET selection.
I have tried the code below as well as adding code blocks, but can't make it work.
I figure it is simple but I could use a hint.
Thanks in advance.
GeneB in Albuquerque
I have tried the code below as well as adding code blocks, but can't make it work.
I figure it is simple but I could use a hint.
Thanks in advance.
GeneB in Albuquerque
Code: Select all
cLetter := cItem := " "
aItems := {" "}
@ 1,1 DCGET cLetter PICTURE "!" ;
VALID {|| FillItems(cLetter,@aItems) ;
, DC_GetRefresh() ;
, .T. }
@ 2,1 DCCOMBOBOX cItem LIST aItems
FUNCTION FillItems(cLetter,aItems)
IF cLetter=="A"
aItems := {"apple","arrow"}
ELSE
aItems := {"banana","bugle"}
ENDIF
RETURN nil