Dear All,
I have over 12000 items in one dbf file which I use in DbCombo. But it takes a very long time to load. I have observed that it does not happen that way with listbox. Can I do something to speedup Dbcombo ?
Secondly search get starts a fresh with space character. But I want to find something which has space in between. How can I search that ?
TIA
Milan.
DbCombo Problem
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Milan,
Both are valid concerns, but not easily solvable.
DBCombo inherits from TCombobox and TCombobox uses an array to hold the list, so there will be a lag time each time the control is created. You could store the list in a static array instead of loading it each time, but a list that large will take up some memory and it will not contain any updates made to the DBF when the application is running.
An alternative is to just use a small button next to a Get and call another dialog containing a listbox and a get for doing an incremental search. This would be much faster and not require any memory overhead.
Regarding the space issue, I had to pick a key to reset the search and a space seemed like a good one at the time. The reset key has to be something users will think of trying or accidentally discover since we have no easy way of displaying this information. I will see how difficult it may be to make this key into a data element so you can change it to any key you wish. I'll put in on my To Do list.
James
Both are valid concerns, but not easily solvable.
DBCombo inherits from TCombobox and TCombobox uses an array to hold the list, so there will be a lag time each time the control is created. You could store the list in a static array instead of loading it each time, but a list that large will take up some memory and it will not contain any updates made to the DBF when the application is running.
An alternative is to just use a small button next to a Get and call another dialog containing a listbox and a get for doing an incremental search. This would be much faster and not require any memory overhead.
Regarding the space issue, I had to pick a key to reset the search and a space seemed like a good one at the time. The reset key has to be something users will think of trying or accidentally discover since we have no easy way of displaying this information. I will see how difficult it may be to make this key into a data element so you can change it to any key you wish. I'll put in on my To Do list.
James