- I am using a ListBox Control with RowSourceType = 0
- I have add the item as
a
b
c
d
- When I use RemoveItem/RemoveListItem to remove the item at middle
like 'c', the list become
a
b
d
and the listcount=3, it seem valid until now.
- However, when I using the loop
for i=1 to listbox.listcount
messagebox(listbox.listitem(i)
next
I get the value of "a", "b", ""
- I use debug watch and find that the value of "d" still in
listbox.listitem(4)
- I have tried refresh but not effect in the result
- Is it a bug in foxpro sp5?
- Any one have same problems?
hth
-Stefan
LOCAL i
IF PEMSTATUS(_screen, 'List1', 5)
_screen.RemoveObject('List1')
ENDIF
_screen.AddObject('List1','Listbox')
WITH _screen.List1
.Move(100,20)
.AddItem("a")
.AddItem("b")
.AddItem("c")
.AddItem("d")
.Visible = .T.
WAIT WINDOW
.RemoveItem(2)
FOR i = 1 TO .ListCount
? .List(i)
NEXT
ENDWITH
"Simon" <sleun...@yahoo.com.cn> schrieb im Newsbeitrag
news:823baa81.0409...@posting.google.com...