>Hi all,
>
>I have made a listbox with two columns,I set the rowsource as an array A_text[num,2].
>
>A_text[num,1] is used as the entry ID, A_text[num,2] is to store the data..
>
>Since my program is needed to support multi_language.. sometimes I have to change the data of the array in this way:
>
>for i=1 to Num_of_entry
> A_text[i, 2] = Data_In_Different_Language
>endfor
>
>after the for-loop I run FormName.ListBoxName.requery() and FormName.ListBoxName.refresh() but the display doesn't changed correctly, only part of the text is changed, I have to run other function of the listbox (such as inserting/deleting some items in it) then the display will be correct again. Those function also have .requery() executed in it..
>
>Any suggestion please?
Jimi,
Probably NumberOfElements is wrong. ie: This works sucessfully :
-Create a form and add a listbox and a commandbutton to it
-Create a form property as myArray[1]
with this
dimension .myArray[10,2]
for ix=1 to alen(.myArray,1)
.myArray[ix,1] = 'ID'+padl(ix,5,'0')
.myArray[ix,2] = 'Text'+padl(ix,5,'0')
endfor
endwith
With this
.ColumnCount =ALEN(thisform.myArray,2)
.Columnwidths = '100,100'
.NumberOfElements=ALEN(thisform.myArray)
.RowSourceType=5
.RowSource='thisform.myArray'
Endwith
with thisform
for ix=1 to alen(.myArray,1)
.myArray[ix,2] = 'Change'+padl(ix,5,'0')
endfor
.List1.Requery()
endwith
Cetin