AutoCompleteComboBox not show items

Issue #204 resolved
Rodrigo Meireles created an issue

Hi, I add items with

myautocompletecombobox.AvailableOptions.Add ("Test1"); myautocompletecombobox.AvailableOptions.Add ("Test2"); myautocompletecombobox.AvailableOptions.Add ("Test3"); myautocompletecombobox.AvailableOptions.Add ("Test4"); myautocompletecombobox.AvailableOptions.Add ("Test5");

on start of my script but not show when play my app

on inspector show the items but not on my app running

my unity is 2017.2

Comments (4)

  1. Simon Jackson

    OK, so you are programatically adding items while running. I admit, I haven't tested that use case, so I'll need to look in to in.

  2. JBKacerovsky

    I encountered a similar issue using Combobox. I was able to solve it by including the following lines in the Combobox script to set the available options while running and to update thee displayed list.

            public void SetAvailableOptions(List<string> newOptions)
            {
                AvailableOptions = newOptions;
                RebuildPanel();
            }
    

    then I simply call myComboBox.SetAvailableOptions(ListOfNewOptionStings) from the script.

    Something similar should work for autocompletecombobox, I think.

  3. Log in to comment