"Smart" edit/comboboxes

Searches with different keywords on the archives didn't net any definitive
answers.

Has anyone created (or does the base wxPython already support) edit controls
and/or combobox controls that show a shrinking list of matches as the user
types in text? I'm thinking along the lines of the way Quicken works. If at
the end of typing (leaving the field), if the entry didn't exist, the user is
prompted if they want to add that value to the list of possible choices. I'm
tying the back end to a database so I want to have the user confirm whether to
create relational entries. I'm still debating whether to have this portion
embedded in a wx.Grid or as a separate area below the wx.Grid where the user
would enter new records.

Being the typical lazy programmer, I'd rather mooch off of existing code than
roll my own solution.

Matthew Zaleski

The demo contains a search box (lower left corner) that let you search for specific widgets…

Cheers, Frank

···

2007/1/29, Matthew Zaleski mzaleski@spamcop.net:

Has anyone created (or does the base wxPython already support) edit controls
and/or combobox controls that show a shrinking list of matches as the user
types in text?

Frank Niessink wrote:

2007/1/29, Matthew Zaleski <mzaleski@spamcop.net <mailto:mzaleski@spamcop.net>>:

    Has anyone created (or does the base wxPython already support) edit
    controls
    and/or combobox controls that show a shrinking list of matches as
    the user
    types in text?

The demo contains a search box (lower left corner) that let you search for specific widgets...

There is also a sample in the wiki of an auto completing text ctrl. http://wiki.wxpython.org/index.cgi/TextCtrlAutoComplete

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

To the questioner of a few days ago, another two potential sources for you:

1) the gnumed Project cvs has a good phrase wheel, initially conceptualised by
myself back around 1995 and used in my vb programs here at work and some
software projects we did over a few years with local doctors, made much
better for linux By Karsten Hilbert/Ian Haywood.

2) Myself and Ian Haywood have been extending this in recent weeks

We have a **very very smart** popup phrase wheel in developement designed to
use as a textbox replacement which:

* may/may not be linked to the backend database, displaying whatever field you
want in the popup (we link to postgres)
* links to aspell and spell checks as you type
* has flags like NUMERIC, EMAIL_CHARS, WEB_CHARS, CAPS_NAMES, CAPS_ALLCAPS,
CAPS_FIRST, CAPS_WORDS, CAPS_NONE (smart with things like surnames eg O'Neil
* has a flag LEARN to learn users habits for future use (ie take textbox
contents and re-save to db for future use in the list)
* linked to timer so only searches/works when a pre-determined time passes
* has been used as a popup in stc in previous days.

and much more!!

We are currently using ours in development of a demographic database. Ian is a
very clever programmer (unlike myself) but is not on this list, but like
myself, a medical graduate from AU.

Now the unfortunate part, I don't think it can be unhooked from our current
code modules to see it functioning, however if you want to look at the logic
I'm sure I could email anyone interested a copy of its current state.

Note sure how it compares to the auto-complete text thingy on the web site as
havn't' looked at that.

Its GPL anyway so will be free to adapt/modify/dump back into the
arena. I'll discuss with Ian.

There must be acres of such goodies lying around if only we knew it (I guess
that's what wxPython itself is!!!!!!!!!!).

If you are interested e-mail me privately.

Richard

···

On Tuesday 30 January 2007 07:25, Robin Dunn wrote:

Frank Niessink wrote:
> 2007/1/29, Matthew Zaleski <mzaleski@spamcop.net
> <mailto:mzaleski@spamcop.net>>:
>
> Has anyone created (or does the base wxPython already support) edit
> controls
> and/or combobox controls that show a shrinking list of matches as
> the user
> types in text?
>
>
> The demo contains a search box (lower left corner) that let you search
> for specific widgets...

There is also a sample in the wiki of an auto completing text ctrl.
http://wiki.wxpython.org/index.cgi/TextCtrlAutoComplete

1) the gnumed Project cvs has a good phrase wheel, initially conceptualised by
myself back around 1995 and used in my vb programs here at work and some
software projects we did over a few years with local doctors, made much
better for linux By Karsten Hilbert/Ian Haywood.

2) Myself and Ian Haywood have been extending this in recent weeks

We have a **very very smart** popup phrase wheel in developement designed to
use as a textbox replacement which:

* may/may not be linked to the backend database, displaying whatever field you
want in the popup (we link to postgres)
* links to aspell and spell checks as you type
* has flags like NUMERIC, EMAIL_CHARS, WEB_CHARS, CAPS_NAMES, CAPS_ALLCAPS,
CAPS_FIRST, CAPS_WORDS, CAPS_NONE (smart with things like surnames eg O'Neil
* has a flag LEARN to learn users habits for future use (ie take textbox
contents and re-save to db for future use in the list)
* linked to timer so only searches/works when a pre-determined time passes

If you want to see all that and now, too, go here:

http://cvs.savannah.gnu.org/viewcvs/gnumed/gnumed/client/wxpython/gmPhraseWheel.py?rev=1.94&root=gnumed&view=log

This is the GNUmed version which has been enhanced to
include all the things Richard describes above.

Note sure how it compares to the auto-complete text thingy on the web site as
havn't' looked at that.

The one thing both phrasewheels lack so far is
auto-completion or completion-on-tab (such as the command
line does for filenames etc).

The GNUmed one is GPL, too, of course.

Karsten

···

On Fri, Feb 02, 2007 at 08:17:06AM +1100, Richard wrote:
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346