NppToolBucket
NppToolBucket copied to clipboard
Tab switching doesn't work on Multiline search and replace
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:
- Use Form.ShowDialog(). This would mean that the user cannot use Notepad++ while the search and replace dialog is open. Not a satisfactory solution.
- Ignore WinForms tab switching and manually implement tab switching by intercepting the tab key press. A bit of work but definitely the best solution.
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