General information
Category:
Forms & Form designer
Hi Brian
I have a similar problem in that I wanted my currently selected value to be highlighted in a list.
My list is populated by an array aMeasures. The current value I know is nMeasure which relates to the third column of the array. In the list itself I only display the first two columns.
So in the Init of the form I create the array as follows from a couple of tables
COPY TO ARRAY aMeasures ;
FIELDS cbmdes.DESCRIPTIO,gmt3.grm_w_aus,gmt3.meas_descr ;
REST WHILE gmt3.code_num=p2
My list (lstMeasures) has these properties set
RowSourceType=5
RowSource=aMeasures
ControlSource=nMeasure
BoundTo=.T.
BoundColumn=3
The item in the list is now highlighted and the .Value property of the list now gives me the new nMeasure value. So you don't need to know the Index of the item just let the list sort it out itself.
Hope this helps
Charlie
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only