Click here to Skip to main content
15,896,063 members
Articles / Desktop Programming / Windows Forms

A User-Searchable TextBox, RichTextBox, ListView, and TreeView in C#

Rate me:
Please Sign up or sign in to vote.
4.79/5 (58 votes)
18 Aug 20066 min read 287.4K   4.5K   176  
A lightweight class library that extends the Framework's most popular editor controls to include search and other basic functionality.
<?xml version="1.0"?>
<doc>
    <assembly>
        <name>SearchableControls</name>
    </assembly>
    <members>
        <member name="T:SearchableControls.SearchableTreeView">
             <summary>
             An extension of the Framework's TreeView control that allows the user to search for text in the tree
             by pressing CTRL-F (or from the menu or a toolbar if provided by the application author).
             </summary>
             <remarks>
             To use, simply build the SearchableControls library and add a reference it in your project. The
             SearchableTreeView control should appear in the SearchableControls tab of the Visual Studio toolbox.
             Drag this control to your forms in the way you would a standard TreeView.
             
             You may wish to give your forms an Edit/Find menu item with a specified shortcut of Ctrl-F. 
             This should call the OpenFindDialog() function of the main searchable control, or in the case of
             multiple searchable controls, the focused control. You could provide the same option from toolbars.
             
             By default this form will just search the Text field of each TreeViewNode. A mechanism exists to
             provide a delegate to perform an alternative searching procedure. 
             
             As you can see the class is derived directly from TreeView so can do everything that the standard
             TreeView can do.
            </remarks>
        </member>
        <member name="T:SearchableControls.ISearchable">
            <summary>
            Searchable controls inherit from ISearchable interface to allow the FindDialog to invoke searches
            and to make it easier to invoke searches from a form's menu or toolbars when multiple searchable
            controls are used.
            </summary>
        </member>
        <member name="M:SearchableControls.ISearchable.OpenFindDialog">
            <summary>
            Open the find dialog
            </summary>
            <remarks>
            Typically called by owning forms' menus and toolbars
            </remarks>
        </member>
        <member name="M:SearchableControls.ISearchable.Search(System.Text.RegularExpressions.Regex)">
            <summary>
            Perform the search on the control
            </summary>
            <param name="regularExpression">The regular expression to use to match text</param>
            <returns>'True' if the search found something</returns>
            <remarks>Intended for use by the FindDialog()</remarks>
        </member>
        <member name="M:SearchableControls.ISearchable.FindNextIsAvailable">
            <summary>
            Discover whether the control will respond to FindNext,
            i.e. if an initial search has been performed.
            </summary>
            <returns>'True' if the control will respond to calling its FindNext function</returns>
            <remarks>
            Typically used by client applications to decide whether to 'grey out' menu or toolbar entries 
            relating to FindNext()
            </remarks>
        </member>
        <member name="M:SearchableControls.ISearchable.FindNext">
            <summary>
            Repeat the user's previous 'find' operation
            </summary>
            <returns>
            'True' if a match was found
            </returns>
            <remarks>
            Typically called by owning forms' menus and toolbars
            </remarks>
        </member>
        <member name="F:SearchableControls.SearchableTreeView.components">
            <summary> 
            Required designer variable.
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableTreeView.Dispose(System.Boolean)">
            <summary> 
            Clean up any resources being used.
            </summary>
            <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        </member>
        <member name="M:SearchableControls.SearchableTreeView.InitializeComponent">
            <summary> 
            Required method for Designer support - do not modify 
            the contents of this method with the code editor.
            </summary>
        </member>
        <member name="F:SearchableControls.SearchableTreeView.findDialog">
            <summary>
            Stores the find dialog (there is a one-to-one relationship between text box and dialog
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableTreeView.#ctor">
            <summary>
            Construct a SearchableTreeView treeview control
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableTreeView.SearchableTreeView_KeyDown(System.Object,System.Windows.Forms.KeyEventArgs)">
            <summary>
            Handle key events. Used to provide find functions
            </summary>
            <param name="sender">Standard system parameter</param>
            <param name="e">Standard system parameter</param>
        </member>
        <member name="M:SearchableControls.SearchableTreeView.DefaultNodeSearch(System.Windows.Forms.TreeNode,System.Text.RegularExpressions.Regex)">
            <summary>
            Default function to search a node
            </summary>
            <param name="treeNode">The TreeNode to search</param>
            <param name="regularExpression">The regular expression to use to match text</param>
            <returns>'True' if the treeNode is deemed to have matched</returns>
        </member>
        <member name="M:SearchableControls.SearchableTreeView.SubSearch(System.Text.RegularExpressions.Regex,System.Windows.Forms.TreeNodeCollection,System.Windows.Forms.TreeNode@)">
            <summary>
            A recursive 'sub search' command is used to search part of the tree
            </summary>
            <param name="regularExpression">The regular expression to use to match text</param>
            <param name="treeNodeCollection">The collection of nodes to search down from</param>
            <param name="startAfterNode">The node that searching actually begins from
            (otherwise just walk the tree until this node is found)</param>
            <returns>'True' if a match was made</returns>
        </member>
        <member name="M:SearchableControls.SearchableTreeView.RestoreHideSelection(System.Object,System.EventArgs)">
            <summary>
            Put this control's HideSelection property back to normal when the FindDialog is deactivated
            </summary>
            <remarks>
            This unfortunately causes a slight flicker. One way to avoid this is to turn off HideSelection
            in individual control instances.
            </remarks>
        </member>
        <member name="M:SearchableControls.SearchableTreeView.OpenFindDialog">
            <summary>
            Open the find dialog
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableTreeView.Search(System.Text.RegularExpressions.Regex)">
            <summary>
            Actually perform the search
            </summary>
            <param name="regularExpression">The regular expression to use to match text</param>
            <returns>'True' if the search found something</returns>
        </member>
        <member name="M:SearchableControls.SearchableTreeView.FindNext">
            <summary>
            Repeat the user's previous 'find' operation
            </summary>
            <returns>
            'True' if a match was found
            </returns>
        </member>
        <member name="M:SearchableControls.SearchableTreeView.FindNextIsAvailable">
            <summary>
            Discovers whether the control will respond to FindNext
            </summary>
            <returns>'True' if the control will respond to calling its FindNext function</returns>
            <remarks>
            Typically used by client applications to decide whether to 'grey out' menu or toolbar entries 
            relating to FindNext()
            </remarks>
        </member>
        <member name="P:SearchableControls.SearchableTreeView.NodeSearcher">
            <summary>
            Node searching function
            </summary>
            <remarks>
            This is set to a search of the Text property of the treeNode, but can be overridden by the
            client to provide custom search facilities of whatever the node conceptually contains, typically
            by using the node's Tag value to link it to an object.
            </remarks>
        </member>
        <member name="T:SearchableControls.SearchableTreeView.NodeSearchDelegate">
            <summary>
            Delegate of node searching function.
            </summary>
            <param name="node">The TreeNode to search</param>
            <param name="regularExpression">The regular expression to use to match text</param>
            <returns>'True' if the treeNode is deemed to have matched</returns>
        </member>
        <member name="T:SearchableControls.FindDialog">
            <summary>
            A dialog to find a user-supplied text string
            </summary>
            <remarks>
            <para>Part of SearchableControls written by Jim Blackler (jimblackler@gmail.com), July 2006</para>
            <para>Could be added to any control not just those supplied with SearchableControls</para>
            </remarks>
            <summary>
            A simple dialog to find a supplied text string
            </summary>
        </member>
        <member name="F:SearchableControls.FindDialog.internalClose">
            <summary>
            Used to allow the closing event handler to know that it should actually close the form
            </summary>
        </member>
        <member name="F:SearchableControls.FindDialog.parent">
            <summary>
            Record of the parent, the searchable control
            </summary>
        </member>
        <member name="M:SearchableControls.FindDialog.#ctor(SearchableControls.ISearchable)">
            <summary>
            Make a simple find dialog
            </summary>
            <param name="_parent">Parent control, when this control is no longer focused the find window will automatically close </param>
        </member>
        <member name="M:SearchableControls.FindDialog.Parent_Disposed(System.Object,System.EventArgs)">
            <summary>
            Called back with the parent is disposed. Here we actually close our own window, rather than hiding it
            </summary>
            <param name="sender">Standard system parameters</param>
            <param name="e">Standard system parameters</param>
        </member>
        <member name="M:SearchableControls.FindDialog.Parent_Leave(System.Object,System.EventArgs)">
            <summary>
            Event added to the parent dialog so that this control can hide itself when the parent control isn't active
            </summary>
        </member>
        <member name="M:SearchableControls.FindDialog.searchButton_Click(System.Object,System.EventArgs)">
            <summary>
            Search button has been pressed
            </summary>
        </member>
        <member name="M:SearchableControls.FindDialog.textBox1_TextChanged(System.Object,System.EventArgs)">
            <summary>
            User is typing in the text string box... make sure label doesn't say 'Find Again' any more
            </summary>
        </member>
        <member name="M:SearchableControls.FindDialog.searchTypeComboBox_SelectedIndexChanged(System.Object,System.EventArgs)">
            <summary>
            User changed search type... re-enable search button.
            </summary>
        </member>
        <member name="M:SearchableControls.FindDialog.ignoreCaseCheckBox_CheckedChanged(System.Object,System.EventArgs)">
            <summary>
            User checked ignore case checkbox... re-enable search button.
            </summary>
        </member>
        <member name="M:SearchableControls.FindDialog.EnableSearch">
            <summary>
            Enable the search button
            </summary>
        </member>
        <member name="M:SearchableControls.FindDialog.FindDialog_KeyDown(System.Object,System.Windows.Forms.KeyEventArgs)">
            <summary>
            User has pressed a key in the text box
            </summary>
        </member>
        <member name="M:SearchableControls.FindDialog.Search">
            <summary>
            Perform a search. Can be called externally.
            </summary>
            <returns>
            'True' if a match was found
            </returns>
        </member>
        <member name="M:SearchableControls.FindDialog.Reshow">
            <summary>
            Bring the dialog to the front and select all the text
            </summary>
        </member>
        <member name="M:SearchableControls.FindDialog.FindNextIsAvailable">
            <summary>
            Discovers if it is meaningful to attempt to FindNext
            </summary>
            <returns>'True' if it is meaningful to attempt to FindNext
            </returns>
            <remarks>
            Typically used by client applications to decide whether to 'grey out' menu or toolbar entries 
            relating to FindNext()
            </remarks>
        </member>
        <member name="F:SearchableControls.FindDialog.components">
            <summary>
            Required designer variable.
            </summary>
        </member>
        <member name="M:SearchableControls.FindDialog.Dispose(System.Boolean)">
            <summary>
            Clean up any resources being used.
            </summary>
            <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        </member>
        <member name="M:SearchableControls.FindDialog.InitializeComponent">
            <summary>
            Required method for Designer support - do not modify
            the contents of this method with the code editor.
            </summary>
        </member>
        <member name="T:SearchableControls.FindDialog.SearchType">
            <summary>
            Search types for the combo box
            </summary>
        </member>
        <member name="T:SearchableControls.SearchableTextBox">
             <summary>
             An extension of the Framework's TextBox control that allows the user to search for text in the control
             by pressing CTRL-F (or from the menu or a toolbar if provided by the application author).
             It also returns the standard CTRL-A shortcut to select all the text in the control.
             </summary>
             <remarks>
             <para>Part of SearchableControls written by Jim Blackler (jimblackler@gmail.com), July 2006</para>
             
             <para>To use, simply build the SearchableControls library and add a reference it in your project. The
             SearchableTextBox control should appear in the SearchableControls tab of the Visual Studio toolbox.
             Drag this control to your forms in the way you would a standard TextBox.</para>
             
             <para>You may wish to give your forms an Edit/Find menu item with a specified shortcut of Ctrl-F. 
             This should call the OpenFindDialog() function of the main searchable control, or in the case of
             multiple searchable controls, the focused control. You could provide the same option from toolbars.</para>
             
             <para>As you can see the class is derived directly from TextBox so can do everything that the standard
             TextBox can do.</para>
            </remarks>
        </member>
        <member name="F:SearchableControls.SearchableTextBox.findDialog">
            <summary>
            Stores the find dialog (there is a one-to-one relationship between text box and dialog
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableTextBox.#ctor">
            <summary>
            Construct a SearchableTextBox textbox
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableTextBox.SearchableTextBox_KeyDown(System.Object,System.Windows.Forms.KeyEventArgs)">
            <summary>
            Handle key events
            </summary>
            <remarks>
            Used to process custom shortcuts
            </remarks>
            <param name="sender">Standard system parameter</param>
            <param name="e">Standard system parameter</param>
        </member>
        <member name="M:SearchableControls.SearchableTextBox.RestoreHideSelection(System.Object,System.EventArgs)">
            <summary>
            Put this control's HideSelection property back to normal when the FindDialog is deactivated
            </summary>
            <remarks>
            This unfortunately causes a slight flicker. One way to avoid this is to turn off HideSelection
            in individual control instances.
            </remarks>
        </member>
        <member name="M:SearchableControls.SearchableTextBox.contextMenuStrip1_Opening(System.Object,System.ComponentModel.CancelEventArgs)">
            <summary>
            Enable the context menu items that can be invoked
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableTextBox.undoToolStripMenuItem_Click(System.Object,System.EventArgs)">
            <summary>
            Undo from context menu
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableTextBox.cutToolStripMenuItem_Click(System.Object,System.EventArgs)">
            <summary>
            Cut from context menu
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableTextBox.copyToolStripMenuItem_Click(System.Object,System.EventArgs)">
            <summary>
            Copy from context menu
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableTextBox.pasteToolStripMenuItem_Click(System.Object,System.EventArgs)">
            <summary>
            Paste from context menu
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableTextBox.deleteToolStripMenuItem_Click(System.Object,System.EventArgs)">
            <summary>
            Delete from context menu
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableTextBox.selectAllToolStripMenuItem_Click(System.Object,System.EventArgs)">
            <summary>
            Select All from context menu
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableTextBox.findTextToolStripMenuItem_Click(System.Object,System.EventArgs)">
            <summary>
            Find Text from context menu
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableTextBox.OpenFindDialog">
            <summary>
            Open the find dialog
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableTextBox.Search(System.Text.RegularExpressions.Regex)">
            <summary>
            Actually perform the search
            </summary>
            <param name="regularExpression">The regular expression to use to match text</param>
            <returns>'True' if the search found something</returns>
        </member>
        <member name="M:SearchableControls.SearchableTextBox.FindNext">
            <summary>
            Repeat the user's previous 'find' operation
            </summary>
            <returns>
            'True' if a match was found
            </returns>
        </member>
        <member name="M:SearchableControls.SearchableTextBox.FindNextIsAvailable">
            <summary>
            Discovers whether the control will respond to FindNext
            </summary>
            <returns>'True' if the control will respond to calling its FindNext function</returns>
            <remarks>
            Typically used by client applications to decide whether to 'grey out' menu or toolbar entries 
            relating to FindNext()
            </remarks>
        </member>
        <member name="F:SearchableControls.SearchableTextBox.components">
            <summary> 
            Required designer variable.
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableTextBox.Dispose(System.Boolean)">
            <summary> 
            Clean up any resources being used.
            </summary>
            <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        </member>
        <member name="M:SearchableControls.SearchableTextBox.InitializeComponent">
            <summary> 
            Required method for Designer support - do not modify 
            the contents of this method with the code editor.
            </summary>
        </member>
        <member name="T:SearchableControls.Utility">
            <summary>
            Place holder for utility functions relating to the SearchableControls collection
            </summary>
            <remarks>
            <para>Part of SearchableControls written by Jim Blackler (jimblackler@gmail.com), July 2006</para>
            <para>Note that these functions are only worth using if you have more than one SearchableControl on 
            a form.</para>
            </remarks>
        </member>
        <member name="M:SearchableControls.Utility.FindSearchable(System.Windows.Forms.Control.ControlCollection)">
            <summary>
            Returns either the focused control, if it is ISearchable. Otherwise the
            searchable control with the lowest TabIndex.
            </summary>
            <param name="controlCollection">The control collection to search</param>
            <remarks>
            Provided as a utility function to allow client applications to easily provide a Find option in 
            their forms' Edit menus, or on toolbars.
            </remarks>
        </member>
        <member name="M:SearchableControls.Utility.OpenFindDialog(System.Windows.Forms.Control.ControlCollection)">
            <summary>
            Opens the find dialog on the most appropriate control in the container
            </summary>
            <returns>'True' if a find dialog was found to open</returns>
            <remarks>
            Uses the utility functions FindSearchable() with the form's ControlCollection to find either the
            focused control, if it is ISearchable, or the searchable control with the lowest TabIndex.
            Calls OpenDialog on the resulting control.
            </remarks>
        </member>
        <member name="M:SearchableControls.Utility.FindNext(System.Windows.Forms.Control.ControlCollection)">
            <summary>
            Calls FindNext() on the most appropriate control in the container
            </summary>
            <returns>'True' if FindNext executed successfully on a control</returns>
            <remarks>
            Uses the utility functions FindSearchable() with the form's ControlCollection to find either the
            focused control, if it is ISearchable, or the searchable control with the lowest TabIndex.
            Calls OpenDialog on the resulting control.
            </remarks>
        </member>
        <member name="M:SearchableControls.Utility.FindNextIsAvailable(System.Windows.Forms.Control.ControlCollection)">
            <summary>
            Informs the user if FindNext is available in the supplied control selection
            </summary>
            <returns>The value of FindNextIsAvailable() on the most appropriate control in the container</returns>
            <remarks>
            Uses the utility functions FindSearchable() with the form's ControlCollection to find either the
            focused control, if it is ISearchable, or the searchable control with the lowest TabIndex.
            Calls OpenDialog on the resulting control.
            </remarks>
        </member>
        <member name="T:SearchableControls.SearchableListView">
             <summary>
             An extension of the Framework's ListView control that allows the user to search for text in the tree
             by pressing CTRL-F (or from the menu or a toolbar if provided by the application author).
             </summary>
             <remarks>
             <para>Part of SearchableControls written by Jim Blackler (jimblackler@gmail.com), July 2006</para>
             
             <para>To use, simply build the SearchableControls library and add a reference it in your project. The
             SearchableListView control should appear in the SearchableControls tab of the Visual Studio toolbox.
             Drag this control to your forms in the way you would a standard ListView.</para>
             
             <para>You may wish to give your forms an Edit/Find menu item with a specified shortcut of Ctrl-F. 
             This should call the OpenFindDialog() function of the main searchable control, or in the case of
             multiple searchable controls, the focused control. You could provide the same option from toolbars.</para>
             
             <para>By default this form will just search the Text field of each ListViewNode. A mechanism exists to
             provide a delegate to perform an alternative searching procedure.</para>
             
             <para>As you can see the class is derived directly from ListView so can do everything that the standard
             ListView can do.</para>
            </remarks>
        </member>
        <member name="F:SearchableControls.SearchableListView.findDialog">
            <summary>
            Stores the find dialog (there is a one-to-one relationship between text box and dialog
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableListView.#ctor">
            <summary>
            Construct a SearchableListView treeview control
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableListView.SearchableListView_KeyDown(System.Object,System.Windows.Forms.KeyEventArgs)">
            <summary>
            Handle key events. Used to provide find functions
            </summary>
            <param name="sender">Standard system parameter</param>
            <param name="e">Standard system parameter</param>
        </member>
        <member name="M:SearchableControls.SearchableListView.DefaultNodeSearch(System.Windows.Forms.ListViewItem,System.String,System.Boolean)">
            <summary>
            Default function to search a node
            </summary>
            <param name="listViewItem">The ListViewItem to search</param>
            <param name="searchExpression">Text to search for</param>
            <param name="ignoreCase">'True' if the search is case independent</param>
            <returns>'True' if the listViewItem is deemed to have matched</returns>
        </member>
        <member name="M:SearchableControls.SearchableListView.RestoreHideSelection(System.Object,System.EventArgs)">
            <summary>
            Put this control's HideSelection property back to normal when the FindDialog is deactivated
            </summary>
            <remarks>
            This unfortunately causes a slight flicker. One way to avoid this is to turn off HideSelection
            in individual control instances.
            </remarks>
        </member>
        <member name="M:SearchableControls.SearchableListView.OpenFindDialog">
            <summary>
            Open the find dialog
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableListView.SearchRange(System.Text.RegularExpressions.Regex,System.Int32,System.Int32)">
            <summary>
            Search a subset of the list view's items', by index range
            </summary>
            <param name="regularExpression">The regular expression to use to match text</param>
            <param name="start">The list index to start searching from</param>
            <param name="end">The list index after the one to stop searching at</param>
            <returns>'True' if the search was successful</returns>
        </member>
        <member name="M:SearchableControls.SearchableListView.Search(System.Text.RegularExpressions.Regex)">
            <summary>
            Actually perform the search
            </summary>
            <param name="regularExpression">The regular expression to use to match text</param>
            <returns>'True' if the search found something</returns>
        </member>
        <member name="M:SearchableControls.SearchableListView.FindNext">
            <summary>
            Repeat the user's previous 'find' operation
            </summary>
            <returns>
            'True' if a match was found
            </returns>
        </member>
        <member name="M:SearchableControls.SearchableListView.FindNextIsAvailable">
            <summary>
            Discovers whether the control will respond to FindNext
            </summary>
            <returns>'True' if the control will respond to calling its FindNext function</returns>
            <remarks>
            Typically used by client applications to decide whether to 'grey out' menu or toolbar entries 
            relating to FindNext()
            </remarks>
        </member>
        <member name="F:SearchableControls.SearchableListView.components">
            <summary> 
            Required designer variable.
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableListView.Dispose(System.Boolean)">
            <summary> 
            Clean up any resources being used.
            </summary>
            <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        </member>
        <member name="M:SearchableControls.SearchableListView.InitializeComponent">
            <summary> 
            Required method for Designer support - do not modify 
            the contents of this method with the code editor.
            </summary>
        </member>
        <member name="P:SearchableControls.SearchableListView.NodeSearcher">
            <summary>
            Node searching function
            </summary>
            <remarks>
            This is set to a search of the Text property of the listViewItem, but can be overridden by the
            client to provide custom search facilities of whatever the node conceptually contains, typically
            by using the node's Tag value to link it to an object.
            </remarks>
        </member>
        <member name="T:SearchableControls.SearchableListView.NodeSearchDelegate">
            <summary>
            Delegate of node searching function.
            </summary>
            <param name="node">The ListViewItem to search</param>
            <param name="searchExpression">Text to search for</param>
            <param name="ignoreCase">'True' if the search is case independent</param>
            <returns>'True' if the listViewItem is deemed to have matched</returns>
        </member>
        <member name="T:SearchableControls.SearchableRichTextBox">
             <summary>
             An extension of the Framework's RichTextBox control that allows the user to search for text in the
             control by pressing CTRL-F (or from the menu or a toolbar if provided by the application author).
             It also returns the standard CTRL-A shortcut to select all the text in the control.
             </summary>
             <remarks>
             <para>Part of SearchableControls written by Jim Blackler (jimblackler@gmail.com), July 2006</para>
             
             <para>To use, simply build the SearchableControls library and add a reference it in your project. The
             SearchableRichTextBox control should appear in the SearchableControls tab of the Visual Studio
             toolbox. Drag this control to your forms in the way you would a standard RichTextBox.</para>
             
             <para>You may wish to give your forms an Edit/Find menu item with a specified shortcut of Ctrl-F. 
             This should call the OpenFindDialog() function of the main searchable control, or in the case of
             multiple searchable controls, the focused control. You could provide the same option from toolbars.</para>
             
             <para>As you can see the class is derived directly from RichTextBox so can do everything that the standard
             RichTextBox can do.</para>
            </remarks>
        </member>
        <member name="F:SearchableControls.SearchableRichTextBox.findDialog">
            <summary>
            Stores the find dialog (there is a one-to-one relationship between text box and dialog
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableRichTextBox.#ctor">
            <summary>
            Construct a SearchableRichTextBox textbox
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableRichTextBox.SearchableRichTextBox_KeyDown(System.Object,System.Windows.Forms.KeyEventArgs)">
            <summary>
            Handle key events
            </summary>
            <remarks>
            Used to process custom shortcuts
            </remarks>
            <param name="sender">Standard system parameter</param>
            <param name="e">Standard system parameter</param>
        </member>
        <member name="M:SearchableControls.SearchableRichTextBox.RestoreHideSelection(System.Object,System.EventArgs)">
            <summary>
            Put this control's HideSelection property back to normal when the FindDialog is deactivated
            </summary>
            <remarks>
            This unfortunately causes a slight flicker. One way to avoid this is to turn off HideSelection
            in individual control instances.
            </remarks>
        </member>
        <member name="M:SearchableControls.SearchableRichTextBox.contextMenuStrip1_Opening(System.Object,System.ComponentModel.CancelEventArgs)">
            <summary>
            Enable the context menu items that can be invoked
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableRichTextBox.undoToolStripMenuItem_Click(System.Object,System.EventArgs)">
            <summary>
            Undo from context menu
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableRichTextBox.cutToolStripMenuItem_Click(System.Object,System.EventArgs)">
            <summary>
            Cut from context menu
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableRichTextBox.copyToolStripMenuItem_Click(System.Object,System.EventArgs)">
            <summary>
            Copy from context menu
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableRichTextBox.pasteToolStripMenuItem_Click(System.Object,System.EventArgs)">
            <summary>
            Paste from context menu
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableRichTextBox.deleteToolStripMenuItem_Click(System.Object,System.EventArgs)">
            <summary>
            Delete from context menu
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableRichTextBox.selectAllToolStripMenuItem_Click(System.Object,System.EventArgs)">
            <summary>
            Select All from context menu
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableRichTextBox.findTextToolStripMenuItem_Click(System.Object,System.EventArgs)">
            <summary>
            Find Text from context menu
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableRichTextBox.fontToolStripMenuItem_Click(System.Object,System.EventArgs)">
            <summary>
            Font from context menu
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableRichTextBox.boldToolStripMenuItem_Click(System.Object,System.EventArgs)">
            <summary>
            Bold from context menu
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableRichTextBox.italicsToolStripMenuItem_Click(System.Object,System.EventArgs)">
            <summary>
            Italics from context menu
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableRichTextBox.underlineToolStripMenuItem_Click(System.Object,System.EventArgs)">
            <summary>
            Underline from context menu
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableRichTextBox.OpenFindDialog">
            <summary>
            Open the find dialog
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableRichTextBox.Search(System.Text.RegularExpressions.Regex)">
            <summary>
            Actually perform the search
            </summary>
            <param name="regularExpression">The regular expression to use to match text</param>
            <returns>'True' if the search found something</returns>
        </member>
        <member name="M:SearchableControls.SearchableRichTextBox.FindNext">
            <summary>
            Repeat the user's previous 'find' operation
            </summary>
            <returns>
            'True' if a match was found
            </returns>
        </member>
        <member name="M:SearchableControls.SearchableRichTextBox.FindNextIsAvailable">
            <summary>
            Discovers whether the control will respond to FindNext
            </summary>
            <returns>'True' if the control will respond to calling its FindNext function</returns>
            <remarks>
            Typically used by client applications to decide whether to 'grey out' menu or toolbar entries 
            relating to FindNext()
            </remarks>
        </member>
        <member name="F:SearchableControls.SearchableRichTextBox.components">
            <summary> 
            Required designer variable.
            </summary>
        </member>
        <member name="M:SearchableControls.SearchableRichTextBox.Dispose(System.Boolean)">
            <summary> 
            Clean up any resources being used.
            </summary>
            <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        </member>
        <member name="M:SearchableControls.SearchableRichTextBox.InitializeComponent">
            <summary> 
            Required method for Designer support - do not modify 
            the contents of this method with the code editor.
            </summary>
        </member>
    </members>
</doc>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United Kingdom United Kingdom
Jim Blackler has been a programmer in the games industry for over 10 years. Based in Surrey, UK.

Comments and Discussions