Wiki Home

Delete On The Fly


Namespace: VFP
Delete on the fly occurs when a form that is acting as a picklist, permits deletion of entries in the list.

Imagine a textbox on an invoice that accepts a partial customer name. A customer form is displayed showing the closest matches. The user recognizes that a particular name is a duplicate and wants to delete that customer.

The typical approach for this would require the user to ...

1) In a modal environment, exit the picklist, end the invoice process they were doing before they summoned the list, launch the customer data entry form, find the customer(s), delete one, exit that form, return to the invoice form, click add and restart doing the invoice. Yuck!

2) in a non-modal environment, exit the picklist, launch the customer form, find the customer(s), delete one, exit that form and continue doing the invoice.

A better way would be to delete the record in the picklist form itself, choose the correct name (which closes the picklist form) and continue with the invoice.

Is there a way to delete from a combobox dropdown in the same way that Internet Explorer allows you to highlight an autocomplete entry in a combobox dropdown (while the dropdown list is open) and delete an entry via the Delete key while the dropdown stays open.

I can trap the Delete key via Key Press - but how do I
- update the comboboxes data source
- highlight the next item in the comboboxes dropdown
- all the while keeping the dropdown combo open

And do all of the above in a visually "smooth" manner?

Deleting from a listbox is a piece of cake. But deleting from an open dropdown combobox ... HELP!

Contributors: Mike Yearwood
See Also Add On The Fly, Edit On The Fly, Find On The Fly and the Framework Feature Chart
( Topic last updated: 2004.08.29 01:07:29 PM )