unreal.ListViewBase

class unreal.ListViewBase(outer=None, name='None')

Bases: unreal.Widget

Bare-bones base class to make creating custom UListView widgets easier. Child classes should also inherit from ITypedUMGListView<T> to get a basic public ListView API for free.

Child classes will own the actual SListView<T> widgets, but this provides some boilerplate functionality for generating entries. To generate a row for the child list, use GenerateTypedRow with the appropriate SObjectTableRow<T> type for your list

Additionally, the entry widget class can be filtered for a particular class and interface with the EntryClass and EntryInterface metadata arguments This can be specified either on the class directly (see below) or on any BindWidget UProperty

Example: class UMyUserWidget : public UUserWidget {

UPROPERTY(BindWidget, meta = (EntryClass = MyListEntryWidget)) UListView* ListView_InventoryItems;

}

C++ Source:

  • Module: UMG
  • File: ListViewBase.h

Editor Properties: (see get_editor_property/set_editor_property)

  • bp_on_entry_generated (OnListEntryGeneratedDynamic): [Read-Write] Called when a row widget is generated for a list item

  • bp_on_entry_released (OnListEntryReleasedDynamic): [Read-Write] Called when a row widget is released by the list (i.e. when it no longer represents a list item)

  • clipping (WidgetClipping): [Read-Write] Controls how the clipping behavior of this widget. Normally content that overflows the bounds of the widget continues rendering. Enabling clipping prevents that overflowing content from being seen.

    NOTE: Elements in different clipping spaces can not be batched together, and so there is a performance cost to clipping. Do not enable clipping unless a panel actually needs to prevent content from showing up outside its bounds.

  • cursor (MouseCursor): [Read-Write] The cursor to show when the mouse is over the widget

  • entry_widget_class (type(Class)): [Read-Write] The type of widget to create for each entry displayed in the list.

  • flow_direction_preference (FlowDirectionPreference): [Read-Write] Allows you to set a new flow direction

  • is_enabled (bool): [Read-Write] Sets whether this widget can be modified interactively by the user

  • is_volatile (bool): [Read-Write] If true prevents the widget or its child’s geometry or layout information from being cached. If this widget changes every frame, but you want it to still be in an invalidation panel you should make it as volatile instead of invalidating it every frame, which would prevent the invalidation panel from actually ever caching anything.

  • navigation (WidgetNavigation): [Read-Write] The navigation object for this widget is optionally created if the user has configured custom navigation rules for this widget in the widget designer. Those rules determine how navigation transitions can occur between widgets.

  • num_designer_preview_entries (int32): [Read-Write] The number of dummy item entry widgets to preview in the widget designer

  • override_cursor (bool): [Read-Write] Override Cursor

  • render_opacity (float): [Read-Write] The opacity of the widget

  • render_transform (WidgetTransform): [Read-Write] The render transform of the widget allows for arbitrary 2D transforms to be applied to the widget.

  • render_transform_pivot (Vector2D): [Read-Write] The render transform pivot controls the location about which transforms are applied. This value is a normalized coordinate about which things like rotations will occur.

  • slot (PanelSlot): [Read-Write] The parent slot of the UWidget. Allows us to easily inline edit the layout controlling this widget.

  • tool_tip_text (Text): [Read-Write] Tooltip text to show when the user hovers over the widget with the mouse

  • tool_tip_widget (Widget): [Read-Only] Tooltip widget to show when the user hovers over the widget with the mouse

  • visibility (SlateVisibility): [Read-Write] The visibility of the widget

bp_on_entry_generated

(OnListEntryGeneratedDynamic) – [Read-Write] Called when a row widget is generated for a list item

bp_on_entry_released

(OnListEntryReleasedDynamic) – [Read-Write] Called when a row widget is released by the list (i.e. when it no longer represents a list item)

entry_widget_class

(type(Class)) – [Read-Only] The type of widget to create for each entry displayed in the list.

get_displayed_entry_widgets() -> Array(UserWidget)

Gets all of the list entry widgets currently being displayed by the list

Returns:
Return type:Array(UserWidget)
regenerate_all_entries() → None

Full regeneration of all entries in the list. Note that the entry UWidget instances will not be destroyed, but they will be released and re-generated. In other words, entry widgets will not receive Destruct/Construct events. They will receive OnEntryReleased and IUserObjectListEntry implementations will receive OnListItemObjectSet.

scroll_to_bottom() → None

Scroll the entire list down to the bottom-most item

scroll_to_top() → None

Scroll the entire list up to the first item