Hello, I hope someone can help me as an C++ nooby here.
I have to search for a way to get SelectedText within a TextBox or EditableTextBox and only found that there is a fuction called “GetSelectedText” for the EditableTextBox but it isn’t exposed to Blueprints as far as I can see so I try to make a C++ BlueprintFunctionLibrary or UObject Class and make a convert function within it.
I try to get the headers needed for the EditableTextBox Component and want to make a simple Function like this here:
I guess im doing something very wrong here. Ive Included UMG, such as Slate and SlateCore to my Build.CS already.
So basically I just want to be able to call this in Blueprints, give the function my desired EditableTextBox as a Parameter to the function which then should return the Selected Text of that TextBox but I already getting errors that he can’t find class ‘’ to resolve delegate SEditableTextBox.
I don’t know if the Variable Type here is wrong in itself since its calling it a delegate, but I am kinda at a loss here and I am not able to find any suitable answers yet.
1 Like
Thanks for trying to help me.
No I haven’t donw that yet since im not at that point just yet (So this might gets useful later on).
I am currently struggeling to even get the EditableTextBox refrence as a Parameter in my Function.
If I make my Function like this FText GetIt(SEditableTextBox textBox) it says SEditableTextBox needs to be of Type UCLASS, UENUM or USTRUCT.
So I am using (Since it comes from Slate) FText GetIt(SLATE_API::SEditableTextBox textBox) but that results in the Error above (Can’t find class ‘’).
It seems like he can’t find the Class SLATE_API at all and I also don’t know if this is even the right way to get the EditableTextBox Reference in the first place to be honest. Sadly only the SEditableTextBox has the fnction “GetSelectedText” and not the UEditableTextBox
I don’t work with C++ so I am not a help here but have you tried accessing the ‘Editable Text Box’ reference and try to get text out from it?
(TSharedPtr< SEd… - EditableText - Editable text widget)
Info source: SEditableTextBox | Unreal Engine Documentation
Or the ‘Text’ (FText - Text - The text content for this editable text box widget
Info source: UEditableTextBox | Unreal Engine Documentation