[wxPython-users] AutoComplete Text Box
Karsten Hilbert
Karsten.Hilbert at gmx.net
Wed Jun 14 03:39:51 PDT 2006
On Tue, Jun 13, 2006 at 05:58:51PM -0700, Robin Dunn wrote:
> I took a quick look at the code and it looks like it is looking at the
> entire value of the text ctrl to look for matches in the list. So once
> you match and select the first word, when you type some more it is going
> to be looking for a match that includes the first word plus the new
> characters you've typed. You should probably change that so it searches
> back from the current insertion point to the previous space character or
> beginning of line.
You can take a look at the phrasewheel code which I intend
to merge with TextCtrlAutoComplete at some point. It already
does matching of phrases within in the text control. It uses
a "phrase separator" regex to tell which parts to match:
http://cvs.savannah.gnu.org/viewcvs/gnumed/gnumed/client/wxpython/gmPhraseWheel.py?rev=1.70&root=gnumed&view=log
You need to look at what it does if
self.__handle_multiple_phrases is True. The phrase
separators are stored in self.phrase_separators ;-)
If you are interested we can work together on merging more
features of the phasewheel control. I had spoken to the
initial authors of TextCtrlAutoComplete previously and they
were not adverse to doing so as long as it retains its
original functionality in the default setup.
For everyones convenience I am attaching the current version
of the phrasewheel control.
Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gmPhraseWheel.py
Type: text/x-python
Size: 30448 bytes
Desc: not available
Url : http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/20060614/bb87940a/gmPhraseWheel.py
More information about the wxpython-users
mailing list