Delete map surrounds by Del button ?!!

372
1
04-26-2014 01:00 PM
BaghdadAlAlavi
New Contributor
Hi all
My question sounds simple but i couldn't find a working solution for it.
There is PageLayoutControl and some tools for adding north arrow, scalebar, ... to this layout. There is also an ordinary select tool (esriControls.ControlsSelectTool) which allows for selecting elements and resizing and moving them.
Now, i wanna allow user to delete selected elements by pressing Del button. I know how to access selected elements and then deleting them but i don't know where to place that code. In PageLayoutControl_OnKeyUp or PageLayoutControl_OnKeyDown? none of them works.

Any idea?

Best Regards
0 Kudos
1 Reply
NeilClemmons
Regular Contributor III
Not sure about the page layout control, but certain keys do not fire the key up and key down events in Windows forms.  These keys usually fire the key press event.  Try the events exposed by the form that houses your control.
0 Kudos