Walter Meester
HoogkarspelPays-Bas
Information générale
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
>Hi
>
>>The following is the code of the wildsearchcombo which is based upon taxcombo. I can't give you the source of taxcombo as it contains a lot more that you do not need and have to remove as it is Reliant on our framework.
>
>Thank you very much. Great code.
>It seems that uses fixed dbf file for lookup.
>In my case matching list in dropdow should retrieved server through ODBC.
>I started re-factoring it.
We are using VFP side cursors retrieved from SQL server. They contain all the options and they are filtered in this class depending on the contents typed in the combobox
>I noticed that if dropdown is open, home and end keys are moving to first / last item in dropdown and left and righ arrow keys are also not moving cursor in seach field.
>It looks like dropdown intercepts them.
>How to make home key to go to move start of field and end to end of field. Down cal closed if those keys are
>pressed if this helps make them to work.
>Also backspace does not work if menu is open. I changed keypress event a bit to make it work.
>
>If refresh method really reuqired? It contain comment which I doen understand:
>* WM 2016/2/3 This code was added to fix the problem that items were not
>* displayed when soft-deleted
>
>It looks like code does not soft-dele items, it creates new array always.
In our case we have records in tables where the item (record) is soft-deleted for new cases.
So if you are adding a new item you won't see the soft deleted items, but if you're displaying a historical record where the items was used, it needs to display that.
You can leave it out if you don't need it.
>Search method is duplicated in several places. It should be in single method only. Can it be only in keypress event and removed from other places.
Not in our case as we have to deal with the soft-deleted items and populate the drop down depending on the current value of the combo. But refactor as needed in your case.
Walter,
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement