Code Request: TypeAhead for Virtual List Con trol

Mission complete. Woo!

I've created a mixin class for wxListCtrls that provides Type Ahead
functionality and works with both virtual and normal lists. Assumes that
the list is sorted as it uses a binary search to get to the correct item.

I added it to the wiki in the ListControls cookbook page:
http://wiki.wxpython.org/index.cgi/ListControls. However, not being a
wiki-librarian I'm not sure if it should be in a page on it's own and linked
to from ListControls so it's easier to find on its own?

Anyway, feel free to comment / use the code / move the wiki page as you see
fit.

Cheers

Muz

···

-----Original Message-----
From: Robin Dunn [mailto:robin@alldunn.com]
Sent: 07 January 2004 18:43
To: wxPython-users@lists.wxwindows.org
Subject: Re: [wxPython-users] Code Request: TypeAhead for Virtual List
Control

Murray Steele wrote:
> Hi all (and happy new year),
>
> Having just converted some wxListCtrls in my app into
virtual list controls,
> I've realised that this loses the Type Ahead Search*
feature that Windows
> (and other os?) helpfully gives you by default.
>
> As I plod away knocking up my own one and begin to tear out
my hair (so many
> edge cases, how do I reverse engineer the behaviour that
windows gives me,
> etc...) I wonder if:
>
> a) there is some magic switch / class / mixin already there
that I can use.

Not that I know of.

> b) anyone has already written something to do this for
virtual list controls
> and:
> i) they could give me some pointers
> or
> ii) they'd be willing to share it
>
> If not, then whatever I knock up I shall happily donate to
the cause (stick
> it on the wiki?).

Yes, that would be a good place for it.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail:
wxPython-users-help@lists.wxwindows.org

Wow. Nice work. I haven't *tried* the code but it looks really good - thanks for sharing. I sort of implemented this awhile back in a much simpler form, but it was totally coded to work with my particular implementation using SQLObject, and would be pretty much useless otherwise (which is why I never put it on a wiki anywhere). Perhaps I'll look at integrating your cool mixin instead when I get back to that project.

Thanks,
Mark.

···

On Thu, 8 Jan 2004 11:06:40 -0000, Murray Steele <Murray.Steele@aprsmartlogik.com> wrote:

Mission complete. Woo!

I've created a mixin class for wxListCtrls that provides Type Ahead
functionality and works with both virtual and normal lists. Assumes that
the list is sorted as it uses a binary search to get to the correct item.

I added it to the wiki in the ListControls cookbook page:
http://wiki.wxpython.org/index.cgi/ListControls. However, not being a
wiki-librarian I'm not sure if it should be in a page on it's own and linked
to from ListControls so it's easier to find on its own?

Anyway, feel free to comment / use the code / move the wiki page as you see
fit.

Cheers

Muz

-----Original Message-----
From: Robin Dunn [mailto:robin@alldunn.com]
Sent: 07 January 2004 18:43
To: wxPython-users@lists.wxwindows.org
Subject: Re: [wxPython-users] Code Request: TypeAhead for Virtual List
Control

Murray Steele wrote:
> Hi all (and happy new year),
>
> Having just converted some wxListCtrls in my app into
virtual list controls,
> I've realised that this loses the Type Ahead Search*
feature that Windows
> (and other os?) helpfully gives you by default.
>
> As I plod away knocking up my own one and begin to tear out
my hair (so many
> edge cases, how do I reverse engineer the behaviour that
windows gives me,
> etc...) I wonder if:
>
> a) there is some magic switch / class / mixin already there
that I can use.

Not that I know of.

> b) anyone has already written something to do this for
virtual list controls
> and:
> i) they could give me some pointers
> or
> ii) they'd be willing to share it
>
> If not, then whatever I knock up I shall happily donate to
the cause (stick
> it on the wiki?).

Yes, that would be a good place for it.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail:
wxPython-users-help@lists.wxwindows.org

--
Mark