shortcuts

S

Steffen

Hi,

I'm using short cuts for some context menu strip items (for example
"copy" CTRL+C). The context menu belongs to a tree view control. When I
work with another control of my form than the tree view control, the
short cuts shouldn't be enabled because pressing CTRL+C in a text box
shouldn't invoke the handler for the "copy" context menu item of the
tree view control. Is there a way to process the short cuts only when
the tree view control is focused?

Thanks for any help,
Steffen
 
S

Stoitcho Goutsev \(100\)

Steffen,

This is exactly how it works. The form checks only for shortcuts declared on
the level of the main menu. If it finds one there it executes it regardless
of the currently focused control. Shortcuts declared on the level of a
context menu are executed only if the control that has this context menu
attched has the focus also.

Can you post some compilabel sample that demonstrates your porblem?
 
S

Steffen

@ Stoitcho Goutsev (100):

Sorry, I forgot to mention that the context menu items are also
contained in the main menu (I move them from main menu to context menu
and vice versa when the corresponding menu is opening).

At the moment I'm using the KeyDown-event of the tree view control to
assoziate short cuts manually. Not the best solution, but it works.

Thanks,
Steffen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top