Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
List Box
Message
From
24/03/2006 05:14:49
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
24/03/2006 02:26:14
Randy Hooper
Ranco Business Software
Tampa, Florida, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 6
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01107280
Message ID:
01107294
Views:
20
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform