Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
List Box
Message
De
24/03/2006 05:14:49
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
24/03/2006 02:26:14
Randy Hooper
Ranco Business Software
Tampa, Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 6
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01107280
Message ID:
01107294
Vues:
19
>How can I move two items from one listbox to another listbox. thisform.list2.addItem(thisform.list1.value) is going to move the bound coloumn.
>
>Thanks

This is from a class that moves items between oSource,oTarget listboxes:
*MoveItems
lparameters oSource,oTarget
local ix,jx
local array aIndex[1]
With oSource
	For ix = 1 to .Listcount
		If m.lAll or .Selected(m.ix)
			Dimension aIndex[iif(type("aIndex[1]")="L",0,alen(aIndex))+1]
			aIndex[alen(aIndex)] = .IndexToItemId(m.ix)
			For jx = 1 to .ColumnCount
				oTarget.AddListItem(.List(m.ix,m.jx),.IndexToItemId(m.ix),m.jx)
			Endfor
		Endif
	Endfor
	If type("aIndex[1]")#"L"
		For ix = 1 to alen(aIndex)
			.RemoveListItem(aIndex[m.ix])
		Endfor
	Endif
Endwith
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform