DbCombo Problem

DbCombo Problem

Postby Milan Mehta » Fri Jul 27, 2007 1:49 pm

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.
Milan Mehta
 
Posts: 115
Joined: Mon Oct 17, 2005 4:42 am
Location: India

Postby James Bott » Fri Jul 27, 2007 2:09 pm

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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 57 guests