ComboBox - 2 dimensional Array
Publicado: Jue Jun 16, 2005 4:39 am
I have several tables with a code and a description.
for Example:
ADM Admitted
TRN Transferred
DIS Discharged
I want a combo box where the user can enter DIS or drop down the list and
select 'Discharged'. I have an array with the codes for each of the drop
down locations.
What I cannot do is to put DIS in the exit part after the user picks
'Discharged'.
I have tried setting the cText value OnClick or OnChange. No matter what I
try, however, I always get the description ('Discharged' for example) in the
text portion of the combo box.
METHOD cb1Change/cb1OnClick( oSender, nIndex ) CLASS TForm1
::oLabel3:cText := ::cb1ret[nIndex]
::cb1:cText := ::cb1ret[nIndex]
RETURN Nil
cb1ret is the array of codes.
oLabel3 shows the correct code picked
cb1 shows the full description.
What should I do?
for Example:
ADM Admitted
TRN Transferred
DIS Discharged
I want a combo box where the user can enter DIS or drop down the list and
select 'Discharged'. I have an array with the codes for each of the drop
down locations.
What I cannot do is to put DIS in the exit part after the user picks
'Discharged'.
I have tried setting the cText value OnClick or OnChange. No matter what I
try, however, I always get the description ('Discharged' for example) in the
text portion of the combo box.
METHOD cb1Change/cb1OnClick( oSender, nIndex ) CLASS TForm1
::oLabel3:cText := ::cb1ret[nIndex]
::cb1:cText := ::cb1ret[nIndex]
RETURN Nil
cb1ret is the array of codes.
oLabel3 shows the correct code picked
cb1 shows the full description.
What should I do?