How to cast to a widget from a widget in the same widget blueprint

As the title says im trying cast to a widget from a widget in the same widget blueprint


kind of like this, the widget on the left is a button and the widget on the right is a image, what i want to do is whenever i press the button it will cast to the image widget however i dont know how to

All help is appreciated and thanks in advance

I sense confusion regarding what casting is. What are you trying to do, exactly? Press a button and change the image?


There is no need to cast anything - you already know the type of the object you want to interact with. One is a button and the other one an image. Casting can be useful if you did not know that.

Yes and is it okay if you can tell me how to do it without casting?

anything helps and is appreciated

Will you please explain what you’re trying to do, it’s not clear.

Press a button and change the image?

If this, then so:

  • in the widget, flag both the button and the image as variables:

image

  • drag the image reference variable to the graph and execute what’s needed on button click:

thanks a lot a, ill try this immediately and sorry for the late reply

It worked thank, you very much

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.