Delete
Delete()
Used to clear out the contents of a DBEdit drop down
Applies to: ComboBox , Grid , GridCell , KCMLEdit , List Box
Delete()
Used to delete this item
Applies to: ListItem
Introduced in KCML version 5.03
Delete()
Used to drop all the nodes of a tree
Introduced in KCML version 5.02
Delete(iIndex)
Used to remove individual items from a DBEdit dropdown
iIndex | Integer |
---|
Applies to: ComboBox , Grid , GridCell , KCMLEdit , List Box
The polymorphic Delete() method is used to drop entries from listboxes and trees.
Use with lists
There are two variants useful with listsboxes, combo listboxes, KCML edit dropdowns and grid dropdowns.
When called with no arguments the method will clear the list. For example:
.EditControl1.Delete()
When passed the index number of a list entry the method can be used to remove individual items from alistbox or dropdown. For example to remove the fifth item from an unsorted drop down the following would be used:
.EditControl1.Delete(5)
This example program populates a listbox then deletes all the selected items.
Use with trees
When used with trees no arguments are passed. If the method is applied directly to the tree control or an OBJECT reference to the control then it deletes and frees all the nodes in the tree. If applied to an OBJECT reference to a tree node then that node and its children are deleted.
.treeControl1.Delete()
To prune a tree below the given level
OBJECT node = node.Child WHILE (OBJECT node <> NULL) OBJECT nextnode = node.Next node.Delete() OBJECT node = nextnode WEND