General information
Category:
Coding, syntax & commands
Title:
ListBox/ AddItem/ AddList Item
I am using the Moverlists class provided with VFP 7.0 to allow a user to select items from a listbox (lstSource) and transfer them into another listbox (lstSelected).
Adding items is accomplished by the following code:
nCnt = 1
DO WHILE nCnt <= THIS.Parent.lstSource.ListCount
IF THIS.Parent.lstSource.Selected(nCnt)
THIS.Parent.lstSelected.AddItem(THIS.Parent.lstSource.List(nCnt))
THIS.Parent.lstSource.RemoveItem(nCnt)
ELSE
nCnt = nCnt + 1
ENDIF
ENDDO
It works fine except that I modified my Listboxes to be 2 colums each.
When I add the item selected to the lstSelected listbox I am losing my 2nd column.
Will THIS.Parent.lstSource.List(nCnt) need to me modified in order to transfer all columns?
Next
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