Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

OnClick Event to External Button

Hi, Everybody. Everything ok? I hope yes.

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?

alt text

if it possible, please, someone could post some print screen to exemplify. I am a beginner.

Thank you

Product Version: UE 4.14
more ▼

asked Feb 21 '17 at 01:31 PM in Blueprint Scripting

avatar image

Unreal Student
21 4 9 11

avatar image Ghar Feb 21 '17 at 02:31 PM

Get the button and bind the event alt text

I hope I understood the question correctly

avatar image Unreal Student Feb 21 '17 at 03:05 PM

Hi, Ghar. 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.

avatar image Ghar Feb 21 '17 at 03:15 PM

There are many ways you could do this.

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.

avatar image Unreal Student Feb 21 '17 at 03:45 PM

Ghar , 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.

avatar image Ghar Feb 21 '17 at 04:53 PM

I made a video showing the two methods I mentioned before: https://youtu.be/fJiyIBomWqg

Let me know if this is not what you were asking.

avatar image Unreal Student Feb 21 '17 at 07:27 PM

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.

alt text

Thank you my friend

avatar image Ghar Feb 21 '17 at 07:40 PM

Create an event dispatcher in the widget that has the button like this: alt text

Then bind the event when you add the widget as child: alt text

avatar image Unreal Student Feb 21 '17 at 09:30 PM

Thank you so much, Ghar. I appreciate so much your help.

avatar image Evaharvey12 Apr 23 '19 at 05:28 PM

Thanks, for the info

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question