NppToolBucket icon indicating copy to clipboard operation
NppToolBucket copied to clipboard

Tab switching doesn't work on Multiline search and replace

Open phdesign opened this issue 13 years ago • 1 comments

Further investigation determines that using Form.Show() breaks tab switching for text boxes, check boxes and others. This seems to be known problem, perhaps caused by the code being called by unmanaged code?

At any rate, there are only two solutions:

  1. Use Form.ShowDialog(). This would mean that the user cannot use Notepad++ while the search and replace dialog is open. Not a satisfactory solution.
  2. Ignore WinForms tab switching and manually implement tab switching by intercepting the tab key press. A bit of work but definitely the best solution.

phdesign avatar Jun 15 '12 01:06 phdesign

Hmm, it seems using Show() our WinForms form doesn't even get to see tab key presses, a good explanation here:

http://stackoverflow.com/a/9096356

And some possible solutions:

http://www.codeproject.com/Articles/190886/Modeless-WinForm-With-Callback-From-Unmanaged-Code http://msdn.microsoft.com/en-us/library/ms229591%28VS.80%29.aspx

phdesign avatar Jun 15 '12 01:06 phdesign