I have two widgets. The first widget a have a button. I need access the OnClick Event from the second widget. because, the first widget is a child of the second widget. How could I make it?
Hi, . First, thank you. So, I have a UniformGridBox and I have 6 buttons with different names, How could I get the specific name click button. For example ( button 1 clicked ) ( button 2 clicked ) Do you need the same print screen to help me? Please, let me know and I post it to you.
You could do what I showed in the picture with each button. You would end up with 6 different OnClick events.
Another way is to make an event dispatcher in the widget that has the buttons, with an integer argument. Call it every time one of the buttons get’s clicked. Then in the second widget just bind that event and use the integer with a switch to do the button-specific task.
, I’m sorry, but I’m a beginner and I’m studying very hard. Please, could you post a print screen step by step? It’s very important to me be learning. and thank you.
First, Your answer was very great. thank you. but I have a Uniform Grid Box and the widget buttons as a child. I put the buttons on my grid box dynamically and I need to get the name button when it was clicked.