Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

New UI Widgets

Discussion in 'Assets and Asset Store' started by ilih, Feb 11, 2015.

  1. bsawyer

    bsawyer

    Joined:
    May 6, 2014
    Posts:
    37
    Apologies if this has already been mentioned but we're on version 1.8.4 and I've noticed a problem with EasyLayout.

    EasyLayout is constantly setting my scene to "dirty" (e.g. Editor thinks the scene has changed and prompts for me to save) even when no changes have been applied.

    At first I thought this was because of the property setters calling Changed(propertyName) which calls SetDirty(), so I made some local changes - first modified the properties to only call this if the value was actually changing, and then I commented out all references to SetDirty() - and nothing worked. Then I tried looking at EasyLayoutEditor, thinking the problem might lie in custom Editor GUI code, but I still couldn't figure out the root cause.

    All I know is if I disable all objects in my scene that have EasyLayout - and EasyLayout is the ONLY thing they have in common - then my scene stops being constantly marked dirty.
     
  2. ilih

    ilih

    Joined:
    Aug 6, 2013
    Posts:
    1,402
    Thanks, I found problem - it happens only with resize to FitContainer or ShrinkOnOverflow, because elements size changed two times.
    I'll try to fix it now.
     
  3. ilih

    ilih

    Joined:
    Aug 6, 2013
    Posts:
    1,402
    Fixed, please update to 1.9.0b31
     
    hopeful likes this.
  4. bsawyer

    bsawyer

    Joined:
    May 6, 2014
    Posts:
    37
    @ilih I should have mentioned that I'm using Unity 5.6.0. version 1.9.0b31 is labeled on the download page as being for 4.6.1+ instead of 5.6.0+.. will it still work for me? I tried importing it and got a couple of compiler errors.
     
  5. ilih

    ilih

    Joined:
    Aug 6, 2013
    Posts:
    1,402
    Sorry, I deleted import directive by mistake.
    Please add "using UnityEngine.UI;" to UIWidgets/Standart Assets/Connector/MultipleConnector.cs and SingleConnector.cs
     
  6. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,935
    @ilih
    UIWidgets-TMPro1.8.5b1 is not working with UIWidgets.1.9.0b32.
    Please provide an update.
     
  7. ilih

    ilih

    Joined:
    Aug 6, 2013
    Posts:
    1,402
    I added two versions with TextMesh Pro support for 1.0.54 and 1.0.55 because those versions not compatible.
    • 1.9.0b2 for TextMesh Pro 1.0.54 (TextMesh Pro with .cs)and Unity4.6.6 or later
    • 1.9.0b4 for TextMesh Pro 1.0.55 (TextMesh Pro with .dll) and Unity5.4.0 or later
    Both requires UIWidgets 1.9.0b34

    Added in 1.9.0b34:
    • FileDialog
    • FolderDialog
    • DatePicker
    • FileListView
    • PickerBool
    I hope this last beta before 1.9.0 release.
     
    jGate99 likes this.
  8. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,459
    Does it work with unity2017 beta?
     
  9. ilih

    ilih

    Joined:
    Aug 6, 2013
    Posts:
    1,402
    v1.9.0b35 works Unity 2017 beta
    But with Unity 2017.1.0b5 you can receive this problem, it give a lot of warnings, but does.not break anything.
     
  10. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,935
    It doesnt contain TMPro based AutoComplete etc so gives errors with my old code. I'm using Paid TMPro (.cs) based.
     
  11. ilih

    ilih

    Joined:
    Aug 6, 2013
    Posts:
    1,402
    Please show those errors.
     
  12. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,935
    the old TMPro package had TMPro based AutoComplete package, however new one dont have these assets.
     
  13. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,935
    please check difference.
     

    Attached Files:

    • Old.png
      Old.png
      File size:
      138.2 KB
      Views:
      840
    • New.png
      New.png
      File size:
      97.6 KB
      Views:
      810
  14. ilih

    ilih

    Joined:
    Aug 6, 2013
    Posts:
    1,402
    Thanks, I completely forgot that TextMesh Pro with InputField available only Unity 5.2 or later.

    Please check UIWidgets TextMeshPro support 1.9.0b34
     
    Mazak and jGate99 like this.
  15. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,935
    @ilih,

    Can you please provide following feature in ListView?

    Example usecase is,

    I'm using a horizontal list (customWidthListView) as navigation. User selects an item, i show some items in a scrollview, user scrolls down to see all the data. Now user click that selected item again (call it click event) and scroll view goes to Top.

    So can you please provide that click event (along with already available ItemSelect)
     
  16. ilih

    ilih

    Joined:
    Aug 6, 2013
    Posts:
    1,402
    You can do without event, override OnPointerClick function in DefaultItem class
    Code (CSharp):
    1.         public override void OnPointerClick(PointerEventData eventData)
    2.         {
    3.             if (Owner.IsSelected(Index))// it will be selected only on second event.
    4.             {
    5.                 // scroll to top
    6.                 (Owner as SomeListView).ScrollViewScrollToTop();
    7.                 // or just invoke select event again
    8.                 Owner.OnSelect.Invoke(Index, this);
    9.             }
    10.  
    11.             base.OnPointerClick(eventData);
    12.         }
     
    hopeful and jGate99 like this.
  17. RazaTech

    RazaTech

    Joined:
    Feb 27, 2015
    Posts:
    178
    hi!

    Can SlideBlock locked in place ...?
    I don't want that user could close or open SlideBlock on his own.


    i have try to do it with SludeBlock.enabled = false

    but it didn't worked.
     
  18. alizdesk

    alizdesk

    Joined:
    Mar 26, 2015
    Posts:
    46
    Try disabling the game object.
     
  19. RazaTech

    RazaTech

    Joined:
    Feb 27, 2015
    Posts:
    178
    nope i dont want to disable whole GO,

    i have menu in slide block , it will deactivate menu too.
     
  20. ilih

    ilih

    Joined:
    Aug 6, 2013
    Posts:
    1,402
    Added "Interactable" option, please update to 1.9.0b37
    If you need TextMesh Pro support, also update package for TextMesh Pro support.
     
    jGate99 likes this.
  21. RazaTech

    RazaTech

    Joined:
    Feb 27, 2015
    Posts:
    178
  22. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,935
    @ilih,
    Sidebar's scaleedown effect is currently unuseable, please add percentage to limit the scale down. for example, i dont want my content to be scale down more than 30%.
    Thanks
     
  23. ilih

    ilih

    Joined:
    Aug 6, 2013
    Posts:
    1,402
    Added ScaleDownLimit in v1.9.0b38
    Value in range 0..1
    ScaleDownLimit = 0.7 - Content gamobject cannot be scaled lower 70%
    ScaleDownLimit = 0.3 - Content gamobject cannot be scaled lower 30%
     
    jGate99 likes this.
  24. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,935
    @ilih,
    Thank you for this so needed feature, scale down works as expected.

    1- However there is a problem that isModel only works if we click inside the scale down area. It doesnt work if i click out side scale down area.

    2- A feature request, currently it scale down in centre.
    What i want is to set direction to scale down, centre, left or right so my sidebar's content appear like this on right side.
    https://dribbble.com/shots/3308273-Productivity-App-Side-Menu-Mail-View-WIP
    https://dribbble.com/shots/3055971-Ios-Minimal-Side-Nav-for-food-App

    thanks
     
  25. ilih

    ilih

    Joined:
    Aug 6, 2013
    Posts:
    1,402
    Sidebar.cs, replace line 650
    old line:
    Code (CSharp):
    1. var parent = (Content!=null) ? Content : transform.parent;
    new line:
    Code (CSharp):
    1. var parent = (Content!=null) ? Content.parent : transform.parent;
    Probably after 1.9.0 release
     
    jGate99 likes this.
  26. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,935
    Thanks :)
     
  27. imagej

    imagej

    Joined:
    May 13, 2016
    Posts:
    7
    Hi !!!

    I add my project to make modal style dialog.
    dialog has Dropdownlist(UGUI Default).
    But changing the Dropdonwlist value does not change the value on the screen and even if you reset the list, it does not apply.
    If you end the dialog and rerun it, the existing value remains.
    Even if you change the value to the C # code, the will not be updated on the screen.

    I will also add a table to another dialog.

    Please let me know the solution to this problem.
     
  28. ilih

    ilih

    Joined:
    Aug 6, 2013
    Posts:
    1,402
    What Unity version you use?
     
  29. imagej

    imagej

    Joined:
    May 13, 2016
    Posts:
    7
    I use Unity3d 5.6.0f3
     
  30. ilih

    ilih

    Joined:
    Aug 6, 2013
    Posts:
    1,402
    Probably you set dropdownlist value to dialog template, not created one.

    Code should be like this:
    Code (CSharp):
    1.             var dialog = dialogSample.Template();//create dialog from template
    2.      
    3.             dialog.Show(...);//show created dialog
    4.             // set dropdown list value using created dialog
    5.             var dropdown = dialog.GetComponentInChildren<UnityEngine.UI.Dropdown>();//get dropdown componet
    6.             dropdown.value = 1;//set value
    7.             // attach listener only once
    8.             dropdown.onValueChanged.RemoveListener(SomeListener);
    9.             dropdown.onValueChanged.AddListener(SomeListener);
    You should get dropdown list from dialog, not from dialogSample.

    So such code will not work correctly
    Code (CSharp):
    1.             var dialog = dialogSample.Template();//create dialog from template
    2.             dialog.Show(...);//show created dialog
    3.  
    4.             // set dropdown list value using dialog template
    5.             var dropdown = dialogSample.GetComponentInChildren<UnityEngine.UI.Dropdown>();//get dropdown componet
    6.             dropdown.value = 1;//set value
    7.  
     
  31. imagej

    imagej

    Joined:
    May 13, 2016
    Posts:
    7
    Thank you very much for the quick response.

    I think the way I call a dialog is wrong.

    I add UI control in dialog (Hierarchy add : UI->UIWidgets->Dialog template) and disable dialog.
    I made c# code

    Code (CSharp):
    1. [SerializeField]
    2.     private Dialog dialogServerSave;
    3.  
    4. //IEnumerator function
    5. dialogServerSave.Template().Show(....);
    6.  
    I add all the drop down list values in the code.

    Am I wrong in this way?
     
  32. ilih

    ilih

    Joined:
    Aug 6, 2013
    Posts:
    1,402
    You should add dropdown list values to created dialog:
    Code (CSharp):
    1.         [SerializeField]
    2.         private Dialog dialogServerSave;//this is dialog template
    3.  
    4.         private Dialog displayedDialogServerSave;// this is displayed dialog
    5.  
    6.         IEnumerator TestFunc()
    7.         {
    8.             // save created dialog to displayedDialogServerSave instead opening it immediately with "dialogServerSave.Template().Show()"
    9.             displayedDialogServerSave = dialogServerSave.Template();
    10.  
    11.             // show created dialog
    12.             displayedDialogServerSave.Show(...);
    13.  
    14.             // now work with dropdown list - add values and select defaut value.
    15.             // get dropdown
    16.             var dropdown = displayedDialogServerSave.GetComponentInChildren<Dropdown>();
    17.  
    18.             // clear values
    19.             dropdown.ClearOptions();
    20.  
    21.             // create values
    22.             var options = new System.Collections.Generic.List<Dropdown.OptionData>();
    23.             options.Add(new Dropdown.OptionData("Option D"));
    24.             options.Add(new Dropdown.OptionData("Option E"));
    25.             options.Add(new Dropdown.OptionData("Option F"));
    26.  
    27.             // set values
    28.             dropdown.AddOptions(options);
    29.  
    30.             // set selected value
    31.             dropdown.value = 1;
    32.  
    33.             // other code
    34.             ...
    35.         }

    You can get access to selected value with such code:
    Code (CSharp):
    1.         bool DialogOk()
    2.         {
    3.             // get selected value
    4.             var value = displayedDialogServerSave.GetComponentInChildren<Dropdown>().value;
    5.             Debug.Log("Selected value: " + value);
    6.  
    7.             return true;
    8.         }
    9.  
    10.  
    11.             displayedDialogServerSave.Show(
    12.                 ...
    13.                 buttons: new DialogActions(){
    14.                     {"OK", DialogOk},
    15.  
    16.                     {"Close", Dialog.Close},
    17.                 }
    18.                 ...
    19.             );
     
  33. imagej

    imagej

    Joined:
    May 13, 2016
    Posts:
    7
    Sorry for the late confirmation.
    It works in the manner that you have told me, and it works well.

    If at least one dropdonwlist exist, must use [GetComponentsInChilderen<Dropdown>()].
    But it's Pretty uncomfortable. T_T

    I'll ask you a question if you have any questions.

    Thank you ilih.!!
     
  34. imagej

    imagej

    Joined:
    May 13, 2016
    Posts:
    7
  35. ilih

    ilih

    Joined:
    Aug 6, 2013
    Posts:
    1,402
    Probably, but it's allow to open multiple dialogs with different values using only one dialog template.

    You should create own table using ListViewCustom.
    Here is documentation with video. (Code sample on this page for v1.9.0, it's does not works with 1.8.4)
    Code samples located in "UIWidgets\Sample Assets\Table".
     
  36. ilih

    ilih

    Joined:
    Aug 6, 2013
    Posts:
    1,402
    v1.9.0 released.

    Important changes:
    Instead overriding ListView's coloring functions, you can override GraphicsForeground and GraphicsBackground properties in component class.
    Old code:
    Code (CSharp):
    1. //ListViewCustomSample.cs
    2. using System;
    3. using UIWidgets;
    4.  
    5. namespace UIWidgetsSamples {
    6.     public class ListViewCustomSample : ListViewCustom<ListViewCustomSampleComponent,ListViewCustomSampleItemDescription> {
    7.         protected override void SetData(ListViewCustomSampleComponent component, ListViewCustomSampleItemDescription item)
    8.         {
    9.             component.SetData(item);
    10.         }
    11.  
    12.         protected override void HighlightColoring(ListViewCustomSampleComponent component)
    13.         {
    14.             component.Coloring(HighlightedColor, HighlightedBackgroundColor, FadeDuration);
    15.         }
    16.  
    17.         protected override void SelectColoring(ListViewCustomSampleComponent component)
    18.         {
    19.             component.Coloring(SelectedColor, SelectedBackgroundColor, FadeDuration);
    20.         }
    21.  
    22.         protected override void DefaultColoring(ListViewCustomSampleComponent component)
    23.         {
    24.             component.Coloring(DefaultColor, DefaultBackgroundColor, FadeDuration);
    25.         }
    26.     }
    27. }
    28. //ListViewCustomSampleComponent.cs
    29. using UnityEngine;
    30. using UnityEngine.UI;
    31. using UIWidgets;
    32.  
    33. namespace UIWidgetsSamples {
    34.     public class ListViewCustomSampleComponent : ListViewItem {
    35.         // ... skipped code
    36.  
    37.         protected bool IsColorSetted;
    38.        
    39.         public virtual void Coloring(Color primary, Color background, float fadeDuration)
    40.         {
    41.             // reset default color to white, otherwise it will look darker than specified color,
    42.             // because actual color = Text.color * Text.CrossFadeColor
    43.             if (!IsColorSetted)
    44.             {
    45.                 Text.color = Color.white;
    46.                 Background.color = Color.white;
    47.             }
    48.  
    49.             // change color instantly for first time
    50.             Text.CrossFadeColor(primary, IsColorSetted ? fadeDuration : 0f, true, true);
    51.             Background.CrossFadeColor(background, IsColorSetted ? fadeDuration : 0f, true, true);
    52.  
    53.             IsColorSetted = true;
    54.         }
    55.     }
    56. }
    New code:
    Code (CSharp):
    1. //ListViewCustomSample.cs
    2. using System;
    3. using UIWidgets;
    4.  
    5. namespace UIWidgetsSamples {
    6.     public class ListViewCustomSample : ListViewCustom<ListViewCustomSampleComponent,ListViewCustomSampleItemDescription> {
    7.         protected override void SetData(ListViewCustomSampleComponent component, ListViewCustomSampleItemDescription item)
    8.         {
    9.             component.SetData(item);
    10.         }
    11.     }
    12. }
    13.  
    14. //ListViewCustomSampleComponent.cs
    15. using UnityEngine;
    16. using UnityEngine.UI;
    17. using UIWidgets;
    18.  
    19. namespace UIWidgetsSamples
    20. {
    21.     public class ListViewCustomSampleComponent : ListViewItem
    22.     {
    23.         /// <summary>
    24.         /// Foreground graphics for coloring.
    25.         /// </summary>
    26.         public override Graphic[] GraphicsForeground {
    27.             get {
    28.                 return new Graphic[] {Text, };
    29.             }
    30.         }
    And you can implement IViewData<T> interface for component, so you don't need to override ListView.SetData()

    Code (CSharp):
    1. //ListViewCustomSample.cs
    2. using System;
    3. using UIWidgets;
    4.  
    5. namespace UIWidgetsSamples {
    6.     public class ListViewCustomSample : ListViewCustom<ListViewCustomSampleComponent,ListViewCustomSampleItemDescription> {
    7.     }
    8. }
    9.  
    10. //ListViewCustomSampleComponent.cs
    11. using UnityEngine;
    12. using UnityEngine.UI;
    13. using UIWidgets;
    14.  
    15. namespace UIWidgetsSamples
    16. {
    17.     public class ListViewCustomSampleComponent : ListViewItem, IViewData<ListViewCustomSampleItemDescription>
    18.     {
    19.         public override Graphic[] GraphicsForeground {
    20.             get {
    21.                 return new Graphic[] {Text, };
    22.             }
    23.         }
    24.  
    25.         [SerializeField]
    26.         public Image Icon;
    27.  
    28.         [SerializeField]
    29.         public Text Text;
    30.  
    31.         [SerializeField]
    32.         public Progressbar Progressbar;
    33.  
    34.         public void SetData(ListViewCustomSampleItemDescription item)
    35.         {
    36.             if (item==null)
    37.             {
    38.                 Icon.sprite = null;
    39.                 Text.text = string.Empty;
    40.                 Progressbar.Value = 0;
    41.             }
    42.             else
    43.             {
    44.                 Icon.sprite = item.Icon;
    45.                 Text.text = item.Name;
    46.                 Progressbar.Value = item.Progress;
    47.             }
    48.  
    49.             Icon.SetNativeSize();
    50.             //set transparent color if no icon
    51.             Icon.color = (Icon.sprite==null) ? Color.clear : Color.white;
    52.         }
    53.     }
    54. }
    55.  
    Those functions does not break compatibility, so legacy code will works fine.

    Changelog
    • Added AudioPlayer
    • Added Calendar
    • Added DatePicker
    • Added DirectoryTreeView *
    • Added FileDialog *
    • Added FileListView *
    • Added FolderDialog *
    • Added PickerBool (can be used as Confirmation dialog with Yes/No/Cancel options)
    • Accordion: added ResizeMethod property
    • Accordion: protected Items property replaced with public DataSource property with type ObservableList<T>
    • Accordion: added DisableClosed option
    • ColorPicker: added Image palette, you can use it to get colors from custom Texture2D. The texture must have the Read/Write Enabled flag set in the import settings, otherwise this function will fail.
    • ColorPicker: fixed bug with wrong axes with Hue palette
    • Drag&Drop: added generic classes ListViewCustomDragSupport and ListViewCustomDropSupport, using them to add Drap&Drop functionality for own ListView's become more easily. Check ListViewIconsDragSupport and ListViewIconsDropSuppport as reference (ignore TreeNode region).
    • EasyLayout: fixed "dirty" scene bug when using FitContainer or ShrinkOnOverflow
    • ListView's: DataSource can be safely used from other threads
    • ListView's: added GroupedListView sample
    • ListView's: added .Select(int index, bool raiseEvents) function, you can use it to select items without raising events
    • ListView's: added Owner field to ListViewItem (base class for any DefaultItem), it contains link to parent ListView
    • ListView's: you can implement IViewData<T> to DefaultItem component class to avoid overriding ListView.SetData() function
    • ListView's: added virtual properties Graphic[] GraphicsForeground and Graphic[] GraphicsBackground to ListViewItem, you can them to specify grapgics for coloring, instead overriding coloring functions
    • Resizable: mark events as used
    • SlideBlock renamed to Sidebar
    • Sidebar: added new animation types Overlay (default), Push, Uncover, ScaleDown, SlideAlong, SlideOut, Resize
    • Sidebar: added AnimateWithLayout option for Resize animation, use it if you need more than one Sidebar with Resize on same Content object
    • Spinner: added AllowHold option, so you can disable increasing/decreasing value during pointer hold
    • Switch: added .SetStatus(bool value), you can change state without raising corresponding events
    • TileView's: added TileViewCustomSize
    • Tooltip: added UnscaledTime option
    • TreeNode: added RootNode property, used to check if nodes belong to same tree
    • TreeView's and TreeNode: Nodes type change from IObservableList<TreeNode<TItem>> to ObservableList<TreeNode<TItem>>
    • TreeView: added SelectedNodes property
    • TreeView: added DeselectCollapsedNodes property, enabled by default
    • TreeView: added .Node2Index(TreeNode<TItem> node) function
    • TreeView: added .SelectNode(TreeNode<TItem> node) and .SelectNodeWithSubnodes(TreeNode<TItem> node) functions
    • TreeViewDataSource: fixed incorrect branch bug (thanks to Heiko Berres)
    • ProgressBar: added SpeedType option
    • IInputFieldProxy: properties onValueChange, onValueChanged, onEndEdit type changed to UnityEvent<string> and get only.
    • ListView: now is possible change DefaultItem in runtime
    • ListViewItem: now works without ImageAdvanced
    • SlideBlock: added Modal property, if enabled SlideBlock will be closed on click outside SlideBlock
    • Tabs: added EnableTab and DisableTab functions
    * not available for WebGL and Windows Store platforms. Not works on platforms with restricted access to file system.
     
    Mazak, hopeful and zyzyx like this.
  37. imagej

    imagej

    Joined:
    May 13, 2016
    Posts:
    7
  38. ilih

    ilih

    Joined:
    Aug 6, 2013
    Posts:
    1,402
    This can happen if Table gameobject not under Content Layout Group control.

    First add LayoutElement component with specified MinWidth and MinHeight to Table gameobject.
    Then you need put Table under Layout Group control:
    move Table in hierarchy to Content gameobject to make it's parent.
    or add Horizontal or Vertical Layout Group to Table parent gameobjects.

    Here is video explaining how to fix it.
     
  39. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,935
    WOW, congrats on another great release

    • Added AudioPlayer
     
  40. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,935
    @ilih,
    TMPro based Dialog doesnt accept default button as its still referencing old Text component, and so gives error on runtime. Please advise.
     
  41. ilih

    ilih

    Joined:
    Aug 6, 2013
    Posts:
    1,402
    Add DialogButtonComponentTMPro component to button and specify Text for it.
     
    jGate99 likes this.
  42. Mazak

    Mazak

    Joined:
    Mar 24, 2013
    Posts:
    226
    Hi,
    Thanks for the update.

    To update it appears there was a major change to ComboBox.

    ComboBox.Input has removed.

    upload_2017-6-7_21-33-19.png

    What is the simplest fix? I don't like changing the code in a library but this one is a pain to change every where in my code.


    EDIT/UPDATE:
    Continuing the examination for a fix:

    Code (CSharp):
    1.         protected virtual void InputItem(string item)
    2.         {
    3.             if (!editable)
    4.             {
    5.                 return ;
    6.             }
    7.             if (string.IsNullOrEmpty(item))
    8.             {
    9.                 return ;
    10.             }
    11.  
    12.             if (!listView.DataSource.Contains(item))
    13.             {
    14.                 var index = listView.Add(item);
    15.                 listView.Select(index);
    16.             }
    17.         }
    If the item is in the DataSource why is it not selected in the listView?
    Since the only access we have to the selected data is by getting the list view selected index, then converting that to a string, I don't see a way to get the selected item.

    In the example:
    https://ilih.ru/unity-assets/UIWidgets/docs/Manual.Combobox/

    A combobox can only have one selected item, why do you show getting more than one?

    EDIT:
    If I want to set the ComboBox's text to an empty string and deselect anything in the ListView what is the simplest method? Deselect will only deselect one item at a time and I must know what was selected.

    EDIT:
    I spent an hour and a half with the update - sorry it is not stable enough for an update yet.

    Once I put into place the changes to get it to work, ListView had a null value, sorry I did not keep the exception line it was a DefaultItem.gameObject.SetActive(??); I assume the DefaultItem was not initialized and was not null checked.

    The code has been reverted and I don't have time to chase the problem.
     
    Last edited: Jun 8, 2017
  43. ilih

    ilih

    Joined:
    Aug 6, 2013
    Posts:
    1,402
    I check Combobox.cs history, sorry, but ComboBox.Input never exists, look like you added this youself. You should create dervied class instead changing Combobox.
    Code (CSharp):
    1.     public class ComboboxWithInputProperty : Combobox
    2.     {
    3.         public string Input {
    4.             get {
    5.                 return InputProxy.text;
    6.             }
    7.             set {
    8.                 InputProxy.text = value;
    9.             }
    10.         }
    11.     }

    It's a bug.

    Sorry, I forgot that it's only planned, not done yet.

    Set SelectedIndices to empty list, this deselect all items.
    Code (CSharp):
    1.             Combobox.ListView.SelectedIndices = new List<int>();
    Sorry, looks like DefaultItem value was lost during updating to new Unity version, you need just specify it's manually.

     
  44. imagej

    imagej

    Joined:
    May 13, 2016
    Posts:
    7
    Thank you for your answer.

    You need to change the properties of [ScrollRect->Viewport->List::Image Component->Color] transparently, along with the way you told it.

    That's how it works.

    Thank you!!
     
  45. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,935
  46. ilih

    ilih

    Joined:
    Aug 6, 2013
    Posts:
    1,402
    Yes, I remember that.
    I'll try add it in next week.
     
    jGate99 likes this.
  47. RazaTech

    RazaTech

    Joined:
    Feb 27, 2015
    Posts:
    178
    hi!

    i m using ui widgets AutoComplete and having problem with location of DisplayList.
    After Resizing it does't move with inputFiled,

    upload_2017-6-22_7-47-37.png
     
  48. ilih

    ilih

    Joined:
    Aug 6, 2013
    Posts:
    1,402
    Please show RectTransform settings for AutoComplete, InputField and DisplayList before and after resizing.
     
  49. RazaTech

    RazaTech

    Joined:
    Feb 27, 2015
    Posts:
    178
    this is display list
    upload_2017-6-23_2-51-49.png
    this is inputFiled

    upload_2017-6-23_2-51-33.png



    and third one Autocomplete.
    if u are asking about mutual parent of inputFiled and DisplayList. then
    upload_2017-6-23_2-51-59.png

    it has an other child label "Row"
     
  50. ilih

    ilih

    Joined:
    Aug 6, 2013
    Posts:
    1,402
    Please try 1.9.2b1 (I cannot reproduce problem, so not sure if it fixed)
    And I cannot see actual anchors settings on screenshots, but widths are not same, please make sure that InputField and DisplayListView have same horizontal anchors and horizontal stretch (Min X = 0, Max X = 1) will be best.