HurleyShanabarger Posted February 20, 2021 Share Posted February 20, 2021 Hello, before is start reinventing the wheel - is there a function to find a sub-string in a comboxbox? The forum search and help did not produce any result. Thanks! Link to comment Share on other sites More sharing options...
Nine Posted February 20, 2021 Share Posted February 20, 2021 Local $iResult = StringInStr(_ArrayToString(_GUICtrlComboBox_GetListArray($idCombo), Default, 1), "text") “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 20, 2021 Moderators Share Posted February 20, 2021 (edited) HurleyShanabarger, The _GUICtrlComboBox_FindString function just uses the API CB_FINDSTRING call - much the same as the _GUICtrlComboBox_FindStringExact function uses the CB_FINDSTRINGEXACT call. Looking at MSDN there is no API call for a sub-string search, so it there is no easy way. I think you will need to pull the whole combo list (_GUICtrlComboBox_GetListArray) and do your own StringInStr search within it. M23 Edit: Looks like Nine agrees! Edited February 20, 2021 by Melba23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
HurleyShanabarger Posted February 20, 2021 Author Share Posted February 20, 2021 Thanks for the feedback, I think I will take you information and merge it with the solution from here: Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now