-
November 16th, 2011, 01:31 PM
#1
slow down timing between keypresses
Is there anyway to slow down the timing between keypresses in a ListBox ?I am using VC++ 2008?
I am referring to the autofind feature where a file is selected based on the keys pressed on the keyboard.
If you type fast enough you can select a file that starts with specific characters. But if you slow down, the next key pressed will start a new find for that key.
thanks...
-
November 16th, 2011, 04:30 PM
#2
Re: slow down timing between keypresses
Originally Posted by robertpantangco
Is there anyway to slow down the timing between keypresses in a ListBox ?I am using VC++ 2008?
I am referring to the autofind feature where a file is selected based on the keys pressed on the keyboard.
If you type fast enough you can select a file that starts with specific characters. But if you slow down, the next key pressed will start a new find for that key.
thanks...
So let me understand what you're saying:
I'm typing in a name and then decide I need to get up out of my chair and stretch. Now I sit back down, and then finish typing. Are you saying that your control has erased what I previously typed in?
You think that is a good interface?
Regards,
Paul McKenzie
-
November 16th, 2011, 05:15 PM
#3
Re: slow down timing between keypresses
Paul,
Let us for example assume your list box is active and contains the following entries (just as if you are in Windows Explorer):
Advertising.txt
Building.txt
Butterfly.txt
Dairyfarm.txt
Fieldtest.txt
Timeout.txt
Zebra.txt
If you key in the characters "but" quickly, Butterfly.txt will be selected by autofind. I am not sure what this feature is called in Windows. Others call this feature autocomplete.
However, if you key in "bu" then hesitate for say 3 seconds, and type "t", Timeout.txt will now be selected.
Your intent is to select Butterfly.txt initially but since you were a little slow in typing in the three characters "but" in succession the "t" caused Timeout.txt to be selected instead.
Hope I explained this clearly enough.
Thanks for the response.
-
November 17th, 2011, 02:57 AM
#4
Re: slow down timing between keypresses
This is standard Windows behavior, so I don't understand why you would like to change it.
Changing it will confuse the users of your program.
-
November 17th, 2011, 04:04 AM
#5
Re: slow down timing between keypresses
Originally Posted by robertpantangco
Paul,
Let us for example assume your list box is active and contains the following entries (just as if you are in Windows Explorer):
Advertising.txt
Building.txt
Butterfly.txt
Dairyfarm.txt
Fieldtest.txt
Timeout.txt
Zebra.txt
If you key in the characters "but" quickly, Butterfly.txt will be selected by autofind. I am not sure what this feature is called in Windows. Others call this feature autocomplete.
However, if you key in "bu" then hesitate for say 3 seconds, and type "t", Timeout.txt will now be selected.
What if there are 50 entries that are similar in the first 10 characters. Are you saying that if I type in 10 characters, took time to sneeze and wipe my nose, the next letter I type will erase what I already entered because I didn't enter a character in 3 seconds?
Also, what if I'm a slow typist? Is this control going to jump letters around because I happen to type slowly?
I'll ask you again -- given what I stated, does this sound like a good user interface to you? If anything, your users will be very frustrated with this.
Regards,
Paul McKenzie
-
November 17th, 2011, 07:18 AM
#6
Re: slow down timing between keypresses
Paul,
As Marc said, this is standard Windows behavior which I do not want to change. I just want to slow down the timeout so that those who cannot type fast enough can still select the file they want.
And I do not understand what you mean by erasing what has been previously entered. The user is not erasing anything!
This is not a Text box that the user is entering text into.
Go to Windows Explorer and open a folder with many files.
If you key in, the first few letters of a filename, the file will be selected and highlighted!
Marc G understands what I am talking about.
-
November 17th, 2011, 08:15 AM
#7
Re: slow down timing between keypresses
Originally Posted by robertpantangco
Paul,
As Marc said, this is standard Windows behavior which I do not want to change. I just want to slow down the timeout so that those who cannot type fast enough can still select the file they want.
And I do not understand what you mean by erasing what has been previously entered. The user is not erasing anything!
But according to your description, you are moving the first entry away from me if I happen to type slowly.
Again, if there are 50 entries that have the first 10 letters the same, I type in the first 10 letters. The listbox is already close to where I want it to be, but I need to type more to narrow the search down. Then I take a rest for 3 seconds. With your version of what you want to do, what happens if I type another letter?
Regards,
Paul McKenzie
-
November 17th, 2011, 09:59 AM
#8
Re: slow down timing between keypresses
As said, this is a windows thing, and I'm not sure you can change it.
Maybe you can emulate it yourself by catching keypresses and maybe by using LB_FINDSTRING.
-
November 17th, 2011, 10:53 AM
#9
Re: slow down timing between keypresses
To Paul,
When you type in the next letter after the pause, the selection jumps to the first occurence of that letter in the list.
In essence, you move out of the position you were able to narrow at using the first 10 letters and have to start anew.
When the folder contains hundreds of filenames, this could be inconvenient.
-
November 17th, 2011, 10:56 AM
#10
Re: slow down timing between keypresses
To Marc G,
LB_FINDSTRING might help.
I am also thinking of including a "wait" or "sleep" after each OnKeyDown.
-
November 17th, 2011, 11:33 AM
#11
Re: slow down timing between keypresses
How will adding a wait or sleep help?
It might things even worse.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|