ListBox - Search bar for searching through items in ListBox

Hello

Just want to know if it’s possible to add a search bar in rs.ListBox?

I made a number of python scripts, and to be able to access them quickly I made a python script which lists out all the python scripts in a folder on my pc. Any new script I make, I can just save it there and no worry about making a new alias, this method is also useful for my work where I can save new tools in a server folder and all my team members can have access to them right away.

However, because the listbox window size can’t be changed, most of the scripts are hidden in view and I have to scroll down the list, so I think it be nice to be able to search through the list with a search bar and get the one I want to use. Maybe I’m missing something in python?

image

Give this one a try:

I liked the idea and made a searchable Eto Form for running all python scripts inside of the same folder.
Change it as you like :slight_smile:

PythonScriptSelectionDialog.py (4.2 KB)

3 Likes

that is awesome @lando.schumpich! I see you made it to read all the files in the same folder as the script, very clever! Thank’s alot!

how do i change it to use double click to Run and not have to click on the Run button?

Extract the RunScript logic into its own class method and subscribe to the MouseDoubleClick event of the listBox:

PythonScriptSelectionDialog.py (4.6 KB)

2 Likes

thank you @lando.schumpich! Awesome!!