'live type' filtering of list box.

Discussion in 'Questions (Windows Mobile)' started by Hennell, Apr 24, 2008.

  1. Hennell

    Hennell Member Licensed User

    Its quite possible this has a really obvious solution, such as a simple pre-made control or library file but I figured I might as well ask.

    I'm trying to make a 'live search' effect, for choosing the city option for a database app. Essentially the user should be able to start typing the first letters of the city they want, and the list of cities starts reducing based on what is typed. (Like what happens when you search on facebook :))

    I've managed the basic effect fairly easily with a text box a list box and a table, where the list box reads the table which is filtered by the text box contents when you click a button. (Might make more sense if you look at the file).

    My problem is I want to do away with the button and have the table/list box filter as the text box is typed into. I originally tried this with text box key press event, but that updates the text box after the event has finished so it doesn't filter properly.

    I've attached a quick & basic version of the effect bellow to demonstrate what I mean: essentially the idea is to get rid of the button so it filters automatically.

    (If there is a really obvious way to do this or something very similar please mention it; I haven't looked much yet (I started this on my PDA and liked the challenge of this idea :D) I'm just wondering if there is a way to do this in the way I've tried....)

    Attached Files:

    Last edited: Apr 24, 2008
  2. Rioven

    Rioven Active Member Licensed User

    Hi Hennell,

    One simple workaround is to make your own virtual keyboard image or buttons to trigger the input event as I found on some contact applications.

    see attached, sample demo(using buttons).


    Attached Files:

    Last edited: Apr 24, 2008
  3. klaus

    klaus Expert Licensed User

    Attached Files:

  4. Rioven

    Rioven Active Member Licensed User

    :sign0161: I should start exploring this said great door library!
    I was away for sometimes and not thoroughly read the forum.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice