Remove "Replace" tab

Jan 28, 2010 at 7:12 PM

Hi all!

I want the "Find" dialog to display only the "Find" tab, without the "Replace" one. Is this possible?

Thanks in advance!


Jan 28, 2010 at 9:59 PM

The short answer is: no. Sorry.

The long answer is: the FindReplaceDialog form available via the scintilla.FindReplace.ShowFind method is just one possible implementation of a Find dialog. All the search related functionality used by that dialog is available directly from the scintilla.FindReplace object (or scintilla.NativeInterface if necessary). It shouldn't be too difficult to create your own Find dialog and hook some of the button click handlers to that API.




Jan 28, 2010 at 10:18 PM

This is a bit hacky but it should do the trick

scintilla.Commands.RemoveBinding(Keys.H, Keys.Control);
((TabControl)scintilla.FindReplace.Window.Controls.Find("tabAll", true)[0]).TabPages.RemoveAt(1);

There may be other unforeseen side effects however and the Find/Replace dialog's overall implementation was done poorly and never revisited. You're probably better off doing it yourself as Jacob suggests.