Am 09.04.2006 um 06:09 schrieb Christian Miller:

Any thoughts as to how one might go about implementing a dynamic filtered search "control" to a window?

If have done this before the times of container controls and so this is waiting for a big refactoring.

First there should be a master container control which manages the visual appearance of the different search container controls which I called SearchItems.

On startup the master creates one searchitem and registered itself. Each searchitem has the two add and remove buttons. When a button is pressed the searchitem asked the master to create a new one or delete it (but not the first one)

The master creates a new searchitem and places it direct after the caller and moving other items downwards if necessary.

Now the search logic: Let's say you have an array of objects (Me.Data) which should be searched. The searchitem has a found as Boolean function and can decide if this object meets the criteria of the item. Then the search function could be called by the master (which has ItemStore property with all the seachitems)

Dim Found() As Object
For Each Obj As Object In Me.Data
        For Each Item As SearchItem In Me.ItemStore
                If Item.Found(Obj) Then Found.Append Obj
        Next
Next

That is my basic design which works well and fast for large datasets. Is that what you are looking for?

Hans-Georg

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to