Class ListView
A virtualized list that allows up to thousands of items to be displayed.
Inherited Members
Namespace: UE4.UMG
Assembly: UE4DotNet.dll
Syntax
public class ListView : ListViewBase
Remarks
An important distinction to keep in mind here is "Item" vs. "Entry" The list itself is based on a list of n items, but only creates as many entry widgets as can fit on screen. For example, a scrolling ListView of 200 items with 5 currently visible will only have created 5 entry widgets.
To make a widget usable an an entry in a ListView, it must inherit from the IUserObjectListEntry interface.
Properties
| Improve this Doc View SourcebClearSelectionOnClick
Declaration
public bool bClearSelectionOnClick { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
DefaultObject
Get UE4 Default Object for this Class
Declaration
public static ListView DefaultObject { get; }
Property Value
Type | Description |
---|---|
ListView |
EntrySpacing
Entry Spacing
Declaration
public float EntrySpacing { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
ListItems
List Items
Declaration
public ObjectArrayField<UObject> ListItems { get; }
Property Value
Type | Description |
---|---|
ObjectArrayField<UObject> |
SelectionMode
Selection Mode
Declaration
public byte SelectionMode { get; }
Property Value
Type | Description |
---|---|
System.Byte |
StaticClass
Get UE4 Class
Declaration
public static Class StaticClass { get; }
Property Value
Type | Description |
---|---|
Class |
Methods
| Improve this Doc View SourceAddItem(UObject)
Adds an the item to the list
Declaration
public void AddItem(UObject Item)
Parameters
Type | Name | Description |
---|---|---|
UObject | Item |
BP_CancelScrollIntoView()
Cancels a previous request to scroll and item into view.
Declaration
public void BP_CancelScrollIntoView()
BP_ClearSelection()
Clear selection
Declaration
public void BP_ClearSelection()
BP_GetNumItemsSelected()
Gets the number of items currently selected in the list
Declaration
public int BP_GetNumItemsSelected()
Returns
Type | Description |
---|---|
System.Int32 |
BP_GetSelectedItem()
Gets the first selected item, if any; recommended that you only use this for single selection lists.
Declaration
public UObject BP_GetSelectedItem()
Returns
Type | Description |
---|---|
UObject |
BP_GetSelectedItems()
Gets a list of all the currently selected items
Declaration
public (IReadOnlyCollection<UObject>, bool) BP_GetSelectedItems()
Returns
Type | Description |
---|---|
System.ValueTuple<System.Collections.Generic.IReadOnlyCollection<UObject>, System.Boolean> |
BP_IsItemVisible(UObject)
Gets whether the entry for the given object is currently visible in the list
Declaration
public bool BP_IsItemVisible(UObject Item)
Parameters
Type | Name | Description |
---|---|---|
UObject | Item |
Returns
Type | Description |
---|---|
System.Boolean |
BP_NavigateToItem(UObject)
Requests that the given item is navigated to, scrolling it into view if needed.
Declaration
public void BP_NavigateToItem(UObject Item)
Parameters
Type | Name | Description |
---|---|---|
UObject | Item |
BP_ScrollItemIntoView(UObject)
Requests that the given item is scrolled into view
Declaration
public void BP_ScrollItemIntoView(UObject Item)
Parameters
Type | Name | Description |
---|---|---|
UObject | Item |
BP_SetItemSelection(UObject, Boolean)
Sets whether the given item is selected.
Declaration
public void BP_SetItemSelection(UObject Item, bool bSelected)
Parameters
Type | Name | Description |
---|---|---|
UObject | Item | |
System.Boolean | bSelected |
BP_SetListItems(Byte)
Sets the array of objects to display rows for in the list
Declaration
public void BP_SetListItems(byte InListItems)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | InListItems |
BP_SetSelectedItem(UObject)
Sets the given item as the sole selected item.
Declaration
public void BP_SetSelectedItem(UObject Item)
Parameters
Type | Name | Description |
---|---|---|
UObject | Item |
ClearListItems()
Removes all items from the list
Declaration
public void ClearListItems()
GetIndexForItem(UObject)
Returns the index that the specified item is at. Will return the first found, or -1 for not found
Declaration
public int GetIndexForItem(UObject Item)
Parameters
Type | Name | Description |
---|---|---|
UObject | Item |
Returns
Type | Description |
---|---|
System.Int32 |
GetItemAt(Int32)
Returns the item at the given index
Declaration
public UObject GetItemAt(int Index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | Index |
Returns
Type | Description |
---|---|
UObject |
GetListItems(Byte)
Gets the list of all items in the list.
Declaration
public void GetListItems(byte ReturnValue)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | ReturnValue |
Remarks
Note that each of these items only has a corresponding entry widget when visible. Use GetDisplayedEntryWidgets to get the currently displayed widgets.
GetNumItems()
Returns the total number of items
Declaration
public int GetNumItems()
Returns
Type | Description |
---|---|
System.Int32 |
IsRefreshPending()
@return True if a refresh is pending and the list will be rebuilt on the next tick
Declaration
public bool IsRefreshPending()
Returns
Type | Description |
---|---|
System.Boolean |
NavigateToIndex(Int32)
Requests that the item at the given index navigated to, scrolling it into view if needed.
Declaration
public void NavigateToIndex(int Index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | Index |
New(UObject, Name)
Spawn an object of this class
Declaration
public static ListView New(UObject obj = null, Name name = default(Name))
Parameters
Type | Name | Description |
---|---|---|
UObject | obj | |
Name | name |
Returns
Type | Description |
---|---|
ListView |
ScrollIndexIntoView(Int32)
Requests that the item at the given index is scrolled into view
Declaration
public void ScrollIndexIntoView(int Index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | Index |
SetSelectedIndex(Int32)
Sets the item at the given index as the sole selected item.
Declaration
public void SetSelectedIndex(int Index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | Index |
SetSelectionMode(Byte)
Sets the new selection mode, preserving the current selection where possible.
Declaration
public void SetSelectionMode(byte SelectionMode)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | SelectionMode |
Operators
| Improve this Doc View SourceImplicit(IntPtr to ListView)
Convert from IntPtr to UObject
Declaration
public static implicit operator ListView(IntPtr p)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | p |
Returns
Type | Description |
---|---|
ListView |