Listview question.

  • Thread starter Thread starter Joe Bleaux
  • Start date Start date
J

Joe Bleaux

When you press a button in a list view.... say 't', it selects the next
listitem that begins with 't'.

I need to supress this behavior.

Can someone help me out?

Thanks.

(vb.net, winxppro)
 
* "Joe Bleaux said:
When you press a button in a list view.... say 't', it selects the next
listitem that begins with 't'.

I need to supress this behavior.

Why? Why a non-standard behavior?
 
Because I'm using the keypress event to manipulate the contents of the
listitem. In my program in this particular instance, when I press t, I want
to put a timestamp in the listitem. After the timestamp is inserted, the
selected item changes to whatever is next that starts with a t. It's a real
pain in the butt. If I stop the change altogether, or at least change what
it switches to, eg, the next listitem, that would be much better.
 
Joe Bleaux said:
Because I'm using the keypress event to manipulate the contents of
the listitem.

Very, very, *very* bad idea.

ListViews have been around for quite a while, now and people
(i.e. your Users) "know" how to use them. If you start replacing
existing, standard, behaviours with your own, non-standard ones,
your Users are going to get very confused.
when I press t, I want to put a timestamp in the listitem.

Try doing this on Ctrl-T instead. Users are generally much happier
in accepting that control keys differ from program to program.

HTH,
Phill W.
 
Back
Top