E
elijahs
This seems like an obvious one but it has me stumped.
I have a complex form with a bunch of databound grids and textbox
controls. There is a MainMenu control, and a toolbar control with
shortcuts to some of the most common commands - for instance, Save.
When I click on a toolbar control, I can catch the ItemClick event and
do a toolbar.Focus call to switch focus to the toolbar, thereby
pulling focus from whatever input control was previously focused.
This allows the LostFocus event to finish up whatever editing
operation was in, so that the Save command executes with all object
fields updated correctly.
But I can't figure out how to trap a similar event on the MainMenu
item. Do I really have to put a Focus call into every MenuItem.Click
event? That seems rather hacky; I'd be surprised if there's no way
to determine that the MainMenu has been clicked on or received focus
or something?
thanks!
elijah
I have a complex form with a bunch of databound grids and textbox
controls. There is a MainMenu control, and a toolbar control with
shortcuts to some of the most common commands - for instance, Save.
When I click on a toolbar control, I can catch the ItemClick event and
do a toolbar.Focus call to switch focus to the toolbar, thereby
pulling focus from whatever input control was previously focused.
This allows the LostFocus event to finish up whatever editing
operation was in, so that the Save command executes with all object
fields updated correctly.
But I can't figure out how to trap a similar event on the MainMenu
item. Do I really have to put a Focus call into every MenuItem.Click
event? That seems rather hacky; I'd be surprised if there's no way
to determine that the MainMenu has been clicked on or received focus
or something?
thanks!
elijah