Edit Menu question

  • Thread starter Thread starter Michael Rodriguez
  • Start date Start date
M

Michael Rodriguez

I created an edit menu with the standard Cut, Copy and Paste. I then
assigned shortcuts to each menu, CtrlX, CtrlC, etc. However, if I select
some text in a textbox and choose one of these items, it does nothing. Is
that because the textbox lost focus when I clicked the menu? What's the
standard way to get this sort of thing to work with text boxes?

TIA,

Mike Rodriguez
 
Michael,

What is your event handler for those menu items doing? Can you share your
code?

Telmo Sampaio
MCT
 
Hi Telmo,

There is no code. I'm using the ToolbarManager from Infragistics. One of
their options is to simply assign keyboard shortcuts to menu items, so I
just assigned CtrlC, CtrlX, etc...

Mike
 
Michael,

That's the problem. If you do not add code to the event handler you are not
allowing the operating system to do the Copy/Cut/Paste since your code is
handling those functions. And since your function has no code, nothing
happens.

Telmo Sampaio
MCT
 
in the pasteText() method, you should be doing
textBox.Text=(String)iData.GetData(DataFormats.Text);
 
Back
Top