is there any possibility to auto complite combobox text ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • GoOgLe
    Forum Member
    • Mar 2007
    • 452

    is there any possibility to auto complite combobox text ?

    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 ?
  • ShadowUK
    No longer a forum member
    • Oct 2007
    • 1322

    #2
    Originally posted by GoOgLe View Post
    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 ?
    That would require a **** lot of Effort.

    Comment

    • GoOgLe
      Forum Member
      • Mar 2007
      • 452

      #3
      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...
      Attached Files

      Comment

      • webultra
        Forum Member
        • Mar 2007
        • 225

        #4
        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, 04:47 PM.

        Comment

        • webultra
          Forum Member
          • Mar 2007
          • 225

          #5
          I will attach another one, but i can't delete this post.
          Last edited by webultra; 02-13-2009, 05:15 PM.

          Comment

          • webultra
            Forum Member
            • Mar 2007
            • 225

            #6
            This one includes 3 examples for autocomplete a combobox:

            1: Using a RichText Object
            2: Using an Input Object
            3: Using a ListBox

            Comment

            • webultra
              Forum Member
              • Mar 2007
              • 225

              #7
              I just changed the script for autofill the Listbox on page 3, replace the function SearchInComboBoxC with the following code:

              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 IGNORE 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
              This will allow you to add more than 2 results to the ListBox1.

              Comment

              Working...
              X