When a text is pasted into the UltraTextEditor, I would like to preprocess that - look into the clipboard contents for specific stuff and then decide on the contents to be pasted. With normal windows forms textbox, I can override WndProc method, process the WM_PASTE (0x302) message. But with the UltraTextEditor I'm not getting the message - 0x302. Is there any way I can achieve this?
Hi Arun,
No, I think you're right, I didn't think it through to that point.
I don't see any way you can reasonably trap this message in am UltraTextEditor. You can submit the issue to Infragistics as a feature request - perhaps an event like BeforePaste could be added to the control.
Request a Feature or Component
Hi Mike,
Thanks for the reply. Even if I manage to get the reference to the TextBox used by the UltraTextEditor, how would I trap the 'Paste' message destined to that TextBox unless it is a custom one written by myself?
With KeyDown event, we can trap the 'Control+V' key press but how would I trap the paste initiated by right clicking on the textbox's context menu?
I'm not an expert in the windows programming, so please correct me if I didn't get your point.
Arun
Hi,
When an UltraTextEditor control goes into edit mode, it displays a derived TextBox control over itself to allow the user to edit. So what I would recommend is that you use the ControlAdded and ControlRemoved events to trap this TextBox control and then you can do what you want with it.
Another option would be to use the KeyDown event.