Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RemoveListItem Help

Status
Not open for further replies.

astech

Programmer
Jul 25, 2000
59
ID
How to use RemoveListItem in list property.
I'm not found it on the sample in VFP 8 help.
 
astech,

Thisform.List1.RemoveListItem(ThisForm.List1.ListIndex)

Is that what you want ?

-- AirCon --
 
Remember that this method doesn't work with all RecordSourceType values in the list box. In fact it only works when RecordSourceType = 0 or 1 (None or Value).

Rick
 
Thanks for the respond. and this is another question.
How to selected all data in list automaticly or select it all with command
 
May be you try to use another control for your task?
Take a glance at TreeView ActiveX.
You can populate it with simple set of data or data from tables.
It's extremely simply. For your task you can set checkboxes for every node in tree and check them either manually (user choice) or programmatically.

For example:

With this
.Nodes.Add(,,"a","First node")
.Nodes.Add(,,"b","Second node")
.Nodes.Add(,,"c","Third node")
.Nodes.Add(,,"d","Fourth node")
.Nodes.Add(,,"e","Fifth node")
Endwith

Delete node from tree
this.Nodes.Remove("b")

Check All node
For i=1 TO This.Nodes.Count
This.Nodes.Item(i).Checked=.T.
Endfor

Delete checked node from tree
If This.Nodes.Item("a").Checked
This.Nodes.Remove("a")
Endif

Why not?


Juri Shutenko
Municipality of Maardu, Estonia
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top