1
Vote

Pasting text to the Text To Query box fails.

description

Steps to reproduce:
  1. Open Notepad and type "Some random text"
  2. Press Ctrl+A to select the text then Ctrl+C to copy it.
  3. Run RegEx Editor.
  4. Right click the Text to Query box and select Past from the resulting list.
What happened

System.InvalidCastException: Unable to cast object of type 'System.Windows.Forms.RichTextBox' to type 'System.Windows.Forms.TextBox'.
at RegExEditor.frmMain.RegExPopPasteMenu_Click(Object sender, EventArgs e)
at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
at System.Windows.Forms.MenuItem.MenuItemData.Execute()
at System.Windows.Forms.Command.Invoke()
at System.Windows.Forms.Command.DispatchID(Int32 id)
at System.Windows.Forms.Control.WmCommand(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.TextBoxBase.WndProc(Message& m)
at System.Windows.Forms.RichTextBox.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

What was expected
The text "Some random text" to appear in the Text To Query box.

comments