For any UI elements from NGUI that need to react to user input, attach the NGUIButtonMessage script to the object. The object must have a collider in order for this script to work. In that script, you could tell it when to trigger it. Some examples are when you single click the object or when you just pressed it or released it. Then the next property of the script is the method or function name. That is the name of the method that you want to call in your script. The method name in your script must match what's on the method/function name field of the NGUIButton message. The last property is the trigger object. This is the object in which the script resides. For example if the method name that you want to handle the click in is called OnSubmitBttnClicked, and the target is the same game object which has the button message attached, there should be at least one script in that game object that contains a method with such name. Keep in mind if more than one method with the same name exist within the same object, all methods will get called. Here is an example of the method signature of the OnSubmitBttnClicked example:
private void OnSubmitBttnClicked()
{
}
You can also use
//The parameter clickedBttn is the object that contains the button message component
private void OnSubmitBttnClicked(GameObject clickedBttn)
{
}
The level of protection does not matter. You could use private public or protected and it would still get called.
Hope this helps.