[IGN-6521]Unable to Search Through Vision Dropdown Component with Keystrokes

This seemed like an interesting problem, and I had the night off, so I fiddled around with this and developed a prototype searchable combo box:

Version 2 with auto complete and preview selections options enabled and auto resize behavior disabled:

While I was at it, I made all of the colors for the dropdown, textbox, and button all independently accessible:
image

I also added a maxRow property that makes the number of rows displayed variable:
image

...and the width of the dropdown automatically adjusts to the width of the text

Just in case anybody else wants to play around with this and develop it further, here is the working prototype:
prototypeSearchableDropdown.zip|attachment (7.2 KB)
searchableDropdown_v1.014.zip|attachment (7.6 KB)
searchableDropdown_v1.019.zip|attachment (8.6 KB)
searchableDropdown_v2.0.zip|attachment (9.9 KB)
searchableDropdown_v2.01.zip|attachment (10.0 KB)
See the current exchange version for all future updates

Update: v1.014
• Added support for all datatypes
• Restructured code, so the dropdown will populate and function no matter how many columns are present
• Corrected focus issue that would occasionally cause the first letter to be deleted when typing
• Improved data validation, so if the text is edited, and it no longer exactly matches a dropdown selection, the selected index and selected values get set to -1 and the selected label gets set to None
• added clearTextOnClick option that, if selected, will automatically clear the text from text field when the component is initially clicked on.
• Set the minimum width of the dropdown menu to the width of the dropdown itself. The dropdown menu will still automatically widen if the text is wider than the component, but if it runs out of room, a horizontal script will appear.
Update: v1.019
• Added autocomplete option
Update: v2.000
• Added up arrow, down arrow, page up, and page down functionality
• Refactored code for improved efficiency
• Added mouse listener to dropdown to highlight the item the mouse is hovering over
• Added custom properties for changing the foreground and background colors of the selected row in the dropdown
• Added preview selection function
Update: v2.001
• Added escape key functionality to close the dropdown window
• Added an auto resize option that when selected causes the dropdown menu to remove whitespace from the dropdown whenever the number of selectable rows are less than the maxRows parameter.
• This version has been published on the exchange.
Updates v2.02 and v2.03

7 Likes