i know someone made a dll to autocomplite input object but i was wondering if it is possible with combobox or is there another way for it ?
Professional Software Development Tools
i know someone made a dll to autocomplite input object but i was wondering if it is possible with combobox or is there another way for it ?
ok i have decided to do it with sqlite... but there is something wrong... can someone please check the code for me ???
i attached the example...
I think this could help you, this is how I do to autocomplete a combobox. By the way i used xMDB.dll instead of sqlite.
I almost forget it, try changing the Sort combobox property to FALSE and you will be able to have the dropdown list sorted by the most visited url. You can set any sort value editing the query: SELECT Address,Counter FROM Sites ORDER BY...
Last edited by webultra; 02-13-2009 at 04:47 PM.
I will attach another one, but i can't delete this post.
Last edited by webultra; 02-13-2009 at 05:15 PM.
This one includes 3 examples for autocomplete a combobox:
1: Using a RichText Object
2: Using an Input Object
3: Using a ListBox
I just changed the script for autofill the Listbox on page 3, replace the function SearchInComboBoxC with the following code:
This will allow you to add more than 2 results to the ListBox1.Code:function SearchInComboBoxC(ComboBoxObject,sListBoxObject)--Script For Autocomplete ComboBox1 on Page 3 num_OfIndex = 0; wegotresults = false; ListBox.DeleteItem(sListBoxObject, -1); while numOfIndex ~= -1 do num_OfIndex = ComboBox.FindItem(ComboBoxObject, num_OfIndex, LB_BYTEXT, "*"..strA.."*"); if num_OfIndex ~= -1 then ListBox.AddItem(sListBoxObject, tblSites.Data[num_OfIndex][tblSites.ColumnNames[1]], num_OfIndex); ListBox.SetVisible(sListBoxObject, true); wegotresults = true; else --ListBox.DeleteItem(sListBoxObject, -1); if wegotresults ~= true then ListBox.SetVisible(sListBoxObject, false); end if strTabOrEnter then url = ComboBox.GetText("ComboBox1"); IExplorer.Navigate("Plugin1", url); if url ~= "about:blank" then local Query = "INSERT INTO Sites(Address, Counter) VALUES('"..url.."','1')" result = DLL.CallFunction(_SourceFolder.."\\AutoPlay\\Docs\\xMDB.dll", "Query_Update_MDB", "\""..DB.."\",\""..Query.."\",\""..Password.."\"", DLL_RETURN_TYPE_STRING, DLL_CALL_STDCALL) if result == "OK" then --Dialog.Message("Success", "Query executed.", MB_OK, MB_ICONINFORMATION) else Dialog.Message("Failed", result, MB_OK, MB_ICONEXCLAMATION) end end end break; end end end