No announcement yet.

Find widget button by name and Set Is Enabled = True

  • Filter
  • Time
  • Show
Clear All
new posts

    Find widget button by name and Set Is Enabled = True

    Hi, I am wondering if there is anyone out there who knows how I can access buttons within a UMG Widget by name and change [Set Is Enabled = True]. I have found the [Get All Widgets Of Class] but I don't know how to proceed using it and I am fairly new to arrays in Unreal Engine 4. My end goal is: When I press the button "P" on the keyboard all buttons in the specified widget with the start name "Button" to be Set Is Enabled.

    So in conclusion, I feel that I need a [Get All Widgets Of Class] with a [For Each Loop] to [Set Is Enable] for all buttons with the start name "Button". Any help is appreciated!

    Rather than toying with the GetAllWidgets node, consider adding the buttons to an array. A custom event can then access the array and modify any widgets you stored inside:

    Click image for larger version  Name:	Capture.PNG Views:	1 Size:	126.5 KB ID:	1415467

    If you must do it by name, you could try:

    Click image for larger version

Name:	Capture2.PNG
Views:	1121
Size:	88.5 KB
ID:	1415468
    Last edited by Everynone; 01-19-2018, 06:27 AM. Reason: added second pic


      Thank you very, very much for this. This is exactly what I was looking for! Thanks for giving me two solutions to the "issue" that I had!