Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Moving records between list boxes
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Moving records between list boxes
Divers
Thread ID:
00810627
Message ID:
00810627
Vues:
73
I have 2 list boxes on a form namely list 1 and list 2.

I want to be able to move records from list 1 to list 2. I have successfully recreated this without having to use the mover class which I do not want to use.

In the double click event of list 1 I have the following code:
thisform.List2.AddItem(This.List(This.ListIndex))
thisform.RemoveItem(This.ListIndex)
In the double click event of list 2 I have the following code:
thisform.list1.AddItem(This.List(This.ListIndex))
thisform.RemoveItem(This.ListIndex)
The problem I have is that when I double click records from list box 1 to list box 2 the records are copied over but still remain in list box 1. When I double click records in list box 2 to copy them over to list box 1 they DO remove from list box 2. I'm a bit confused!!

Another piece of information is that List box 1 is populated from an on button click event on another form using an SQL statement. The form is released though once the user clicks this button.

If somebody could help it would be greatly appreciated.

Many THanks
Neil Lewis
IT R&D Manager
Velmore Ltd
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform