JScript Posted December 12, 2012 Share Posted December 12, 2012 (edited) Function Reference_ComboBoxAutoFill.au3AutoFill a ComboBox edit control.Sintax:_GUICtrlComboBox_AutoFillCreate( hWnd[, lPartialSearch] ) _GUICtrlComboBox_AutoFillDelete( hWnd ) _GUICtrlComboBox_AutoFillSetContent( hWnd, vData ) _GUICtrlComboBox_AutoFillUpdateContent( hWnd )Supports:; Native and UDF combobox functions!Downloads:Version: 0.12_ComboBoxAutoFill_(RedirectLink).htmlNote: Usage example is included!Sample:Match from beginning:Match from any string:Fixes:0.12.1812.2600b18/12/2012 -> Added the parameter $lPartialSearch in: ;$lPartialSearch - [Optional] Search mode, True for partial. Default is False (Search from the beginning!). _GUICtrlComboBox_AutoFillCreate( hWnd[, lPartialSearch] )Thanks again to @matwachich for the tip! 0.12.1712.2600b18/12/2012 -> The functions were changed by: _GUICtrlComboBox_AutoFillSetContent( hWnd, vData ) _GUICtrlComboBox_AutoFillUpdateContent( hWnd )17/12/2012 -> We added two new functions: _GUICtrlComboBox_AutoFillAddString( hWnd, sText) _GUICtrlComboBox_AutoFillDelString( hWnd, iIndex) Thanks to @matwachich for the tip! 0.12.1212.2600b12/12/2012 -> First release!Regards,João Carlos. Edited December 18, 2012 by JScript UEZ and spudw2k 2 http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted December 12, 2012 Moderators Share Posted December 12, 2012 Neat, I did this with a mem sqlite db before, wish I could find the damn code! Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
AZJIO Posted December 12, 2012 Share Posted December 12, 2012 I added a star, I like it. My other projects or all Link to comment Share on other sites More sharing options...
JScript Posted December 12, 2012 Author Share Posted December 12, 2012 Neat, I did this with a mem sqlite db before, wish I could find the damn code!When you find share with us!I added a star, I like it.Thank you, I'm very glad you enjoyed it!JS http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
guinness Posted December 12, 2012 Share Posted December 12, 2012 Very neat! I'm sure I saw a discussion about this on the best approach and I think you cracked it. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
JScript Posted December 12, 2012 Author Share Posted December 12, 2012 Thank you my friend! JS http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
UEZ Posted December 12, 2012 Share Posted December 12, 2012 (edited) When I enter e.g. a capital B and press the backspace then capital letter will be a small letter and when I press backspace again the combo list is not positioned below the combobox but over the GUI.Br,UEZ Edited December 12, 2012 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
JScript Posted December 12, 2012 Author Share Posted December 12, 2012 @UEZProblem solved and topic updated! Thank you my friend.JS http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
matwachich Posted December 18, 2012 Share Posted December 18, 2012 You should add a function to modify the content of the comboBox Link to comment Share on other sites More sharing options...
JScript Posted December 18, 2012 Author Share Posted December 18, 2012 @matwachichThanks for your reply, I tried to use the functions of addition of native UDF and a new item is not stored!In this case I added two other functions:Fixes:0.12.1712.2600b17/12/2012 -> We added two new functions: _GUICtrlComboBox_AutoFillAddString( hWnd, sText) _GUICtrlComboBox_AutoFillDelString( hWnd, iIndex)Thanks to @matwachich for the tip!JS http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
matwachich Posted December 18, 2012 Share Posted December 18, 2012 Thank YOU for the fast addition! Link to comment Share on other sites More sharing options...
matwachich Posted December 18, 2012 Share Posted December 18, 2012 In addition to the functions you added, i suggest to add these two ones expandcollapse popup; #FUNCTION# ==================================================================================================================== ; Name ..........: _GUICtrlComboBox_AutoFillSetContent ; Description ...: Set the content of a ComboBox ; Syntax ........: _GUICtrlComboBox_AutoFillSetContent($hWnd, $vData) ; Parameters ....: $hWnd - Control ID/Handle to the control. ; $vData - Either an 1-Based array of items, or a pipe "|" delimited string of items. ; Return values .: Success - Items count ; Failure - -1 ; Author ........: Matwachich ; =============================================================================================================================== Func _GUICtrlComboBox_AutoFillSetContent($hWnd, $vData) Local $iIndex, $iCount $iIndex = __CBA_GetHWndIndex($hWnd) If Not $iIndex Then Return -1 _GUICtrlComboBox_ResetContent($hWnd) If Not IsArray($vData) Then $vData = StringSplit($vData, "|") $iCount = $vData[0] _GUICtrlComboBox_BeginUpdate($hWnd) For $i = 1 To $vData[0] _GUICtrlComboBox_InsertString($hWnd, $vData[$i]) Next _GUICtrlComboBox_EndUpdate($hWnd) $avCBA_MSGIDS[$iIndex][2] = $iCount $avCBA_MSGIDS[$iIndex][3] = $vData Return $iCount EndFunc ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GUICtrlComboBox_AutoFillUpdateContent ; Description ...: Update the auto-fill system with the data (items) contained in a comboBox ; Syntax ........: _GUICtrlComboBox_AutoFillUpdateContent($hWnd) ; Parameters ....: $hWnd - Control ID/Handle to the control. ; Return values .: Success - Items count ; Failure - -1 ; Author ........: Matwachich ; Remarks .......: Usefull when you change the data of the comboBox with the default AutoIt functions, and you want to update ; |the auto-fill data ; =============================================================================================================================== Func _GUICtrlComboBox_AutoFillUpdateContent($hWnd) Local $iIndex, $iCount $iIndex = __CBA_GetHWndIndex($hWnd) If Not $iIndex Then Return -1 $aList = _GUICtrlComboBox_GetListArray($hWnd) $iCount = $aList[0] ;----> Update array with the new item! $avCBA_MSGIDS[$iIndex][2] = $iCount $avCBA_MSGIDS[$iIndex][3] = $aList ;<---- Return $iCount EndFunc JScript 1 Link to comment Share on other sites More sharing options...
JScript Posted December 18, 2012 Author Share Posted December 18, 2012 Much better!I made changes according to what you posted, the version remains the same.Fixes:0.12.1712.2600b18/12/2012 -> The functions were changed by: _GUICtrlComboBox_AutoFillSetContent( hWnd, vData ) _GUICtrlComboBox_AutoFillUpdateContent( hWnd )Thank you,JS http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
matwachich Posted December 18, 2012 Share Posted December 18, 2012 No problem!!! I have another idea: - Why not making a parameter to be able to choose to match the begining of the item's string (like it is now), or to match any part of the item's string Link to comment Share on other sites More sharing options...
JScript Posted December 18, 2012 Author Share Posted December 18, 2012 I liked the idea, I will put into practice right now! JS http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
JScript Posted December 18, 2012 Author Share Posted December 18, 2012 Fixes:0.12.1812.2600b18/12/2012 -> Added the parameter $lPartialSearch in: ;$lPartialSearch - [Optional] Search mode, True for partial. Default is False (Search from the beginning!). _GUICtrlComboBox_AutoFillCreate( hWnd[, lPartialSearch] )Thanks again to @matwachich for the tip!JS http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
matwachich Posted December 23, 2012 Share Posted December 23, 2012 No problem! Juste a small problem, sometimes when you type a search in the edit the combo list don't appear in the right place, just under the edit, but it appears on the top of the screen Link to comment Share on other sites More sharing options...
matwachich Posted December 24, 2012 Share Posted December 24, 2012 Here is my version 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