How to Access to a Txtbox in Userwidget with c++?

225518-textbox.png

What I want is, when I write down some word in the textbox which is in my widget blueprint, and then get the text value with c++, not blueprint.
After that,using

GEngine->AddOnScreenDebugMessage(-1, 3.0f, FColor::Red, TextboxMessage); to display on the game screen.
I cannot found any function to access textbox,button which is working on blueprintwidget in c++.
If my English is not good, I’m sorry about that.
Thnx for advance.

Hey there, if you are using the normal textbox you can add an event for OnTextChanged or OnTextCommitted, then you can call a c++ function that does whatever you want, in this case it would be a AddOnScreenDebugMessage.

So you mean,make it event on bluerpint and call it in my C++ code? I already try to make the event Ontextcommited on blueprint, but I don’t know how to call in c++ . Can I have some example , how to call this OnTextCommitted on C++? I spend totally much time in these things… =(
What I guess is using UPROPERTY or UFUNCTION is right way, I think… but I failed,…

You either create a subclass of the textbox and create a UFUNCTION(BlueprintCallable) that does that logic, or you put that function in your character and you call it on the OnTextCommited by using Get Owning Player Pawn → Cast To “Your Character Type” and calling it from there.