Results 1 to 6 of 6

Thread: Listview tricky search [SOLVED]

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2002
    Location
    Plantation, FL (USA)
    Posts
    66

    Listview tricky search [SOLVED]

    Hi,

    The listview has a handy feature to skip through records. When a letter is pressed with the focus on the LV, the selected item goes directly to the record matching the key pressed.

    My question is, how do I get the index of the destination record?

    when using the LV_KeyDown and look for the LV.SelectedItem.Index I get the original record, not the destination index.
    How can I get the result after the event is fired w/o using a timer?


    Thanks,
    Diego
    Last edited by dterza01; Jun 6th, 2003 at 07:42 PM.

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Oct 2002
    Location
    Plantation, FL (USA)
    Posts
    66

    Listview tricky search [SOLVED]

    Oops. Easy answer. I could use the Key_UP event of the listview.

  3. #3
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431
    I don't know but you could perhaps keep track of the KeyAscii value in the KeyPress event, so for example if someone types "lon" you get 108, 111 and 110 as the values. You would then translate that to "lon" and do a search of the listview looking for that starting value. The first one you find will be the eventual target.

  4. #4
    New Member
    Join Date
    Aug 2004
    Location
    Geneva, Switzerland
    Posts
    9

    How to disable to built-in search feature?

    Does anyone know how to disable that tricky built-in search feature? It's causing me problems with a looping search that I've added to the KeyPress event.

  5. #5

  6. #6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width