Design question: wxTextCtrl + wxListView (SQL command)
Milan Babuskov
milanb at panonnet.net
Mon Oct 29 08:08:55 PDT 2007
Petr Prikryl wrote:
> If possible, I want to avoid multithreading.
> Would you recommend using the wxUpdateUIEvent
> to notify the wxListView that wxTextCtrl has changed?
> What is the usual way to do the things like that?
If change is done by the user, have a button that user needs to click
when he's "ready". Unless you are building a kind of "lookup" control?
If that the case, I recommend handling the events for text control and
using a timer. Whenever text changes, reset the timer to fire in 400ms
or something like that. This would prevent hammering of database with
queries while user is typing. When the timer fires, re-run the SQL
statement and re-populate the list control.
--
Milan Babuskov
http://www.flamerobin.org
More information about the wx-users
mailing list