Please enable JavaScript to view this site.

A-Shell Consolidated Reference

This opcode deletes just the row(s) identified by the Answer parameter. It acts similarly to XTROP_RESELECT, not loading any new records. But instead of selecting the row(s) identified by answer, it deletes them. It then waits for a new selection, unless the XTF_NOSEL flag is set, in which case it exits immediately. Note that the original data rows are not internally renumbered, so if you are trying to keep your internal array synchronized with the control, you should only mark the items deleted but not compact the array. For example, if you delete item #2, then reselect from the same array, item #3 will appear in position #2 on the screen, but if you select it, it will still be identified as item #3.

XTROP_DELSEL will mainly be of use in situations where you have a large number of items, making it inefficient to delete and reload the entire control each time you want to get rid of one. This would be particularly true if you did not really need to keep track of the items being deleted within the context of the original array. (For example, you might start with a list of possible items to choose from, and then as you choose them, they are deleted from that list and moved to another list, like in a shopping cart application. You do not really need to keep track of the state of the original list, because when the order is confirmed, you would work from the list of chosen items, rather than from the list of available items.)

See the sample program XTRA4 for an illustration of moving items between two XTREE controls.