views:

20

answers:

0

I have an Infragistics UltraTrackBar control which I am using as a zoom bar. On either side of it, there are UltraLabels marked Out and In. The form that it is on has mnemonics for all of its other labels, so I want to put mnemonics on Out and In as well. I gave the Out and In labels the same TabIndex, and the zoom bar's is one higher.

However, Alt-O does not cause the zoom bar to zoom out. And likewise, Alt-I does not cause the zoom bar to zoom in. All they do is give focus to the zoom bar. I want Alt-O and Alt-I to have the same effect as clicking the - and + buttons on the UltraTrackBar. What is the best way to make it zoom properly when I enter the mnemonic keystrokes?

I have tried adding various events to the labels (Click, Leave, and several others) and the zoom bar (Enter, GotFocus, Leave, Validating, Validated). That didn't work. Does ProcessMnemonic kick off any events?

I've also tried overriding ProcessMnemonic() with mixed results. I can make the zoom bar zoom in and out with the mnemonics there, but I am not sure how to handle other the other mnemonics on the form with it. I asked another question regarding how to best override that method, but on this question I would like to focus on the best way to use mnemonics with a zoom bar.