Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
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?
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement