# How to use UListViewBase::OnEntryWidgetGenerated() and ListViewBase::OnEntryWidgetReleased()

**URL:** <https://forums.unrealengine.com/t/how-to-use-ulistviewbase-onentrywidgetgenerated-and-listviewbase-onentrywidgetreleased/491196>\
**Category:** Editor Scripting\
**Tags:** reference, listview, Input, unreal-engine, question\
**Created:** [November 22, 2021, 4:20pm UTC](https://forums.unrealengine.com/t/how-to-use-ulistviewbase-onentrywidgetgenerated-and-listviewbase-onentrywidgetreleased/491196 "2021-11-22T16:20:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ibetto\_globant](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ibetto\_globant](https://forums.unrealengine.com/u/ibetto_globant)\
**Post date:** [November 22, 2021, 4:20pm UTC](https://forums.unrealengine.com/t/how-to-use-ulistviewbase-onentrywidgetgenerated-and-listviewbase-onentrywidgetreleased/491196/1 "2021-11-22T16:20:26Z")

</div>

Hello, I’m trying to add a UListView to a menu and add delegates to the list tiems. So I’m trying to use UListViewBase::OnEntryWidgetGenerated() and ListViewBase::OnEntryWidgetReleased().

FOnListEntryGenerated and FOnEntryWidgetReleased have a “UUserWidget&” reference input parameter, and I can’t find any binding that compiles to that.

For example, if I write:

```
UFUNCTION()
void OnEntryWidgetGeneratedCallback(UUserWidget& InListEntry);

mListView->OnEntryWidgetGenerated().AddUFunction(this, FName(TEXT("OnEntryWidgetGeneratedCallback"));

```

Then I get an “error : Missing ‘\*’ in Expected a pointer type” at the declaration of OnEntryWidgetGeneratedCallback.

If I write:

```
UFUNCTION()
void OnEntryWidgetGeneratedCallback(UUserWidget* InListEntry);

```

Then I get an “error C2665: ‘TTuple::TTuple’: none of the 2 overloads could convert all the argument types”

Any suggestions? Thanks!

---

<div class="post-metadata">

**Author:** ![CodingRook](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CodingRook](https://forums.unrealengine.com/u/CodingRook)\
**Post date:** [November 23, 2021, 12:27am UTC](https://forums.unrealengine.com/t/how-to-use-ulistviewbase-onentrywidgetgenerated-and-listviewbase-onentrywidgetreleased/491196/2 "2021-11-23T00:27:45Z")

</div>

I think, if I’m not mistaken, you are trying to bind a delegate (that takes a parameter) to your callback, which correctly also works with the same parameter, but without actually providing a… parameter 😉

So after the FName, add (as a second argument to the AddUFunction function) the reference of your UUserWidget. If you have it as a pointer, then dereference it. Makes sense?

---

<div class="post-metadata">

**Author:** ![ibetto\_globant](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ibetto\_globant](https://forums.unrealengine.com/u/ibetto_globant)\
**Post date:** [November 23, 2021, 4:09pm UTC](https://forums.unrealengine.com/t/how-to-use-ulistviewbase-onentrywidgetgenerated-and-listviewbase-onentrywidgetreleased/491196/3 "2021-11-23T16:09:53Z")

</div>

Actually, it doesn’t make sense. The menu that contains the ListView can’t know which UUserWidget was created - that’s the point of having to use mListView-\>OnEntryWidgetGenerated().

On the contrary, UListViewBase::HandleAnnounceGeneratedEntries() calls “OnEntryWidgetGenerated().Broadcast(\*EntryWidget);”. And I’m trying to capture that from the menu that contains the ListView.
