We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Intercept listbox key behavior

When a listbox control has focus and a a key is pressed, it tries to select the item that matches that keystroke. I'd like to have it not do this at all in one particular place, but I cannot figure out how. Is there an easy way to disable this behavior. I tried wiring to the keydown event (and doing nothing with it), but that doesn't seem to help. I'm sure it's simple... just not seeing it. :) - David

3 Replies

AD Administrator Syncfusion Team February 17, 2003 12:34 PM UTC

The listbox control probably does this in it's OnKeyDown method (before firing the KeyDown event) or in ProcessCmdKey method. Try overriding OnKeyDown and not call the base class in a derived class, this will prevent all keydown processing in the listbox control. If that doesn't work try overriding ProcessCmdKey. -Praveen


DA David February 17, 2003 07:23 PM UTC

You mean I have to create my own control type by inheriting from one of theirs? -- David


RP Ramesh Praveen Syncfusion Team February 19, 2003 11:30 AM UTC

Yes, that is what I meant. -Praveen

Loader.
Up arrow icon