I want to clear all the search strings I entered in the Find dialog. How to achieve that?
If we want to clear the items in the Listbox widget, we can use the delete(0, END) method. Besides deleting all the items in the Listbox, we can delete a single item as well by selecting an item from the Listbox, i.e., by using currselection() method to select an item and delete it using the delete() function.
For clearing the listbox you are right in using listbox. Item. Clear() .
All information about the removed item is deleted. You can use this method to remove a specific item from the list by specifying the index of the item to remove from the list. To specify the item to remove instead of the index to the item, use the Remove method. To remove all items from the list, use the Clear method.
BindingSource bindingSource = (BindingSource)listBox1. DataSource; IList SourceList = (IList)bindingSource. List; SourceList. Clear();
ajibanda++ has the answer:
First, locate the application data folder of notepad++. This should be located at:
- for XP
C:\Documents and Settings\[REPLACE_WITH_USER]\Application Data\Notepad++
- For Vista or Win7 it should be somewhere on:
C:\Users\[REPLACE_WITH_USER]\AppData\Roaming\Notepad++
NOTE: This is a hidden folder so it is advisable to make the hidden folders viewable.
Locate and open config.xml to notepad for editing. Take note use notepad not notepad++, for some reason, editing it on notepad++ doesn't save the updates you'll be doing.
Delete the lines with tags:
- to remove, "search" history:
<Find name="[REPLACE_WORD]".../>
- to remove "replace" history :
<Replace name="[REPLACE_WORD]" ..../>
Save config.xml. If Notepad++ is open, close and then re-open it again.
The easy way: Fill the search history with 10 new entries (e.g. 1
, 2
, 3
, ..., 9
, 0
), then restart Notepad++ and the older entries are gone.
This is also very quick, because you just need to press Enter after each digit to execute these 10 searches.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With