I’ve made a dynamic array of buttons inside a scroll box (I’ve made a button widget for this and its a query that retrieves button name from a table), and i’ve want that when i click a button, it will print its button name. What am i doing wrong? im new to unreal…
Binding an event is easy. Create your OnClick event. Now you can call “Bind Event to On Clicked” on each of your buttons. The problem you have is identifying which button was pressed.
The usual way is to create a custom widget with a button in it with the Button Name as a public variable. Then you create an event dispatcher “OnClicked” that has Name as an input. You’d click the ‘+’ icon for the button’s On Click event in the designer to call the dispatcher event with the button name. In your original blueprint, you would create these custom widgets instead of buttons and then bind to the OnClicked dispatch event. These event would provide the name. And you can print it.
2 Likes