I am curious if any of the wx text widgets (or combinations of other
widgets) have a predictive text search feature.
( I may not be using the right terminology for this, so I will
describe)
I've looked through the wx demo projects for this feature,but didn't
see one.
I want to let the user enter a text string in a single line TextCtrl,
which will act as an accelerator for ListBox containing hundreds
(possible thousands) of text strings.
With each letter the user enters, the lines of text in the ListBox
will be displayed which start with the same letters already entered in
the single line TextCtrl.
For example, if ListBox contains the names all of the 50 states ..
Alabama
Alaska
Arizona
Arkansas
California
Colorado
Connecticut
And the user starts typing
New
I want the states starting with 'New" and all of the states following
in alphabetical order to be displayed
New Hampshire
New Jersey
New Mexico
New York
North Carolina
...
In my case, I will be searching a dictionary of hundreds of variable
names generated by a compiler, so the searching and updating the
display must be fast so the user isn't waiting to see the results.
Does such a widget combination exits, or is this more of an
application implementation issue?
If anyone has already done this, would you point me to an example?
Thanks
Hi,
2009/11/16 cappy2112:
I am curious if any of the wx text widgets (or combinations of other
widgets) have a predictive text search feature.
( I may not be using the right terminology for this, so I will
describe)
I've looked through the wx demo projects for this feature,but didn't
see one.
I want to let the user enter a text string in a single line TextCtrl,
which will act as an accelerator for ListBox containing hundreds
(possible thousands) of text strings.
With each letter the user enters, the lines of text in the ListBox
will be displayed which start with the same letters already entered in
the single line TextCtrl.
For example, if ListBox contains the names all of the 50 states ..
Alabama
Alaska
Arizona
Arkansas
California
Colorado
Connecticut
And the user starts typing
New
I want the states starting with 'New" and all of the states following
in alphabetical order to be displayed
New Hampshire
New Jersey
New Mexico
New York
North Carolina
...
In my case, I will be searching a dictionary of hundreds of variable
names generated by a compiler, so the searching and updating the
display must be fast so the user isn't waiting to see the results.
Does such a widget combination exits, or is this more of an
application implementation issue?
If anyone has already done this, would you point me to an example?
The wxPython Wiki is your friend:
http://wiki.wxpython.org/TextCtrlAutoComplete
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
If you don't care about the multiple columns as in the wiki example,
I've made one as part of peppy that uses a popup window with the list
of matches, and it boldfaces the matching portion of words. The popup
also works on OS X.
It's standalone code:
http://trac.flipturn.org/browser/trunk/peppy/lib/textctrl_autocomplete.py
and includes a demo.
Rob
ยทยทยท
On Sun, Nov 15, 2009 at 9:03 PM, cappy2112 <cappy2112@gmail.com> wrote:
I am curious if any of the wx text widgets (or combinations of other
widgets) have a predictive text search feature.