unreal.ListViewBase
¶
- class unreal.ListViewBase(outer: Optional[Object] = None, name: Union[Name, str] = 'None')¶
Bases:
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 FProperty
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)
accessible_behavior
(SlateAccessibleBehavior): [Read-Write] Accessible Behavior: Whether or not the widget is accessible, and how to describe it. If set to custom, additional customization options will appear.accessible_summary_behavior
(SlateAccessibleBehavior): [Read-Write] Accessible Summary Behavior: How to describe this widget when it’s being presented through a summary of a parent widget. If set to custom, additional customization options will appear.accessible_summary_text
(Text): [Read-Write] Accessible Summary Text: When AccessibleSummaryBehavior is set to Custom, this is the text that will be used to describe the widget.accessible_text
(Text): [Read-Write] Accessible Text: When AccessibleBehavior is set to Custom, this is the text that will be used to describe the widget.allow_dragging
(bool): [Read-Write] Allow Dragging: True to allow dragging of row widgets in the listallow_overscroll
(bool): [Read-Write] Allow Overscroll: Disable to stop scrollbars from activating inertial overscrollingbp_on_entry_generated
(OnListEntryGeneratedDynamic): [Read-Write] BP on Entry Generated: Called when a row widget is generated for a list itembp_on_entry_released
(OnListEntryReleasedDynamic): [Read-Write] BP on Entry Released: Called when a row widget is released by the list (i.e. when it no longer represents a list item)can_children_be_accessible
(bool): [Read-Write] Can Children be Accessible: Whether or not children of this widget can appear as distinct accessible widgets.clipping
(WidgetClipping): [Read-Write] Clippingcursor
(MouseCursor): [Read-Write] Cursorenable_fixed_line_offset
(bool): [Read-Write] Enable Fixed Line Offsetenable_right_click_scrolling
(bool): [Read-Write] Enable Right Click Scrolling: True to allow right click drag scrolling.enable_scroll_animation
(bool): [Read-Write] Enable Scroll Animation: True to enable lerped animation when scrolling through the listentry_widget_class
(type(Class)): [Read-Write] Entry Widget Class: The type of widget to create for each entry displayed in the list.fixed_line_scroll_offset
(float): [Read-Write] Fixed Line Scroll Offset: Optional fixed offset (in lines) to always apply to the top/left (depending on orientation) of the list. If provided, all non-inertial means of scrolling will settle with exactly this offset of the topmost entry. Ex: A value of 0.25 would cause the topmost full entry to be offset down by a quarter length of the preceeding entry.flow_direction_preference
(FlowDirectionPreference): [Read-Write] Flow Direction Preferenceis_enabled
(bool): [Read-Write] Is Enabledis_volatile
(bool): [Read-Write] Is Volatile: 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] Navigation: 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] Num Designer Preview Entries: The number of dummy item entry widgets to preview in the widget designeroverride_accessible_defaults
(bool): [Read-Write] Override Accessible Defaults: Override all of the default accessibility behavior and text for this widget.override_cursor
(bool): [Read-Write] Override Cursorrender_opacity
(float): [Read-Write] Render Opacityrender_transform
(WidgetTransform): [Read-Write] Render Transformrender_transform_pivot
(Vector2D): [Read-Write] Render Transform Pivotslot
(PanelSlot): [Read-Write] Slot: The parent slot of the UWidget. Allows us to easily inline edit the layout controlling this widget.tool_tip_text
(Text): [Read-Write] Tool Tip Texttool_tip_widget
(Widget): [Read-Only] Tool Tip Widgetvisibility
(SlateVisibility): [Read-Write] Visibilitywheel_scroll_multiplier
(float): [Read-Write] Wheel Scroll Multiplier: The multiplier to apply when wheel scrolling
- property allow_dragging: bool¶
[Read-Only] Allow Dragging: True to allow dragging of row widgets in the list
- Type:
(bool)
- property bp_on_entry_generated: OnListEntryGeneratedDynamic¶
[Read-Write] BP on Entry Generated: Called when a row widget is generated for a list item
- Type:
- property bp_on_entry_released: OnListEntryReleasedDynamic¶
[Read-Write] BP on Entry Released: Called when a row widget is released by the list (i.e. when it no longer represents a list item)
- Type:
- property enable_scroll_animation: bool¶
[Read-Only] Enable Scroll Animation: True to enable lerped animation when scrolling through the list
- Type:
(bool)
- property entry_widget_class: Class¶
[Read-Only] Entry Widget Class: 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
- Return type:
- 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.
- request_refresh() None ¶
Sets the list to refresh on the next tick.
Note that refreshing, from a list perspective, is limited to accounting for discrepancies between items and entries. In other words, it will only release entries that no longer have items and generate entries for new items (or newly visible items).
It does NOT account for changes within existing items - that is up to the item to announce and an entry to listen to as needed. This can be onerous to set up for simple cases, so it’s also reasonable (though not ideal) to call RegenerateAllEntries when changes within N list items need to be reflected.
- set_scroll_offset(scroll_offset) None ¶
Set the scroll offset of this view (in items)
- Parameters:
scroll_offset (float) –
- set_scrollbar_visibility(visibility) None ¶
Set Scrollbar Visibility
- Parameters:
visibility (SlateVisibility) –