Edit Menu question

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
 
T

Telmo Sampaio

Michael,

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

Telmo Sampaio
MCT
 
M

Michael Rodriguez

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
 
T

Telmo Sampaio

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
 
C

chris m

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

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