# \[Bugs bugs bugs\] Slate widget synchronization

**URL:** <https://forums.unrealengine.com/t/bugs-bugs-bugs-slate-widget-synchronization/738172>\
**Category:** Issues and Bug Reporting\
**Tags:** unreal-engine, slate, feedback, CPP, question\
**Created:** [December 29, 2022, 8:42am UTC](https://forums.unrealengine.com/t/bugs-bugs-bugs-slate-widget-synchronization/738172 "2022-12-29T08:42:36Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Roy\_Wierer.Seda145](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/roy_wierer.seda145/32/906551_2.png) [@Roy\_Wierer.Seda145](https://forums.unrealengine.com/u/Roy_Wierer.Seda145)\
**Post date:** [April 8, 2023, 6:05am UTC](https://forums.unrealengine.com/t/bugs-bugs-bugs-slate-widget-synchronization/738172/4 "2023-04-08T06:05:44Z")

</div>

SetText to something, then get nothing when calling GetText.  
Congratulations.

```auto
FText UEditableTextBox::GetText() const
{
	if ( MyEditableTextBlock.IsValid() )
	{
		return MyEditableTextBlock->GetText();
	}

	return Text;
}

void UEditableTextBox::SetText(FText InText)
{
	// We detect if the Text is internal pointing to the same thing if so, nothing to do.
	if (GetText().IdenticalTo(InText))
	{
		return;
	}

	Text = InText;

	BroadcastFieldValueChanged(FFieldNotificationClassDescriptor::Text);

	if ( MyEditableTextBlock.IsValid() )
	{
		MyEditableTextBlock->SetText(Text);
	}
}

```

Workaround: Manually “update” the text when text is committed… This is required when the text was “set” by typing into the editable text box, after which the getter returns nothing unless you call SetText like this yourself:

```auto

if (IsValid(EditableTextBoxWidget)) {
	EditableTextBoxWidget->OnTextCommitted.AddDynamic(this, &UMyWidget::ActOnEditableTextBoxCommitted);
}

void UMyWidget::ActOnEditableTextBoxCommitted(const FText& Text, ETextCommit::Type CommitMethod) {
	EditableTextBoxWidget->TakeWidget();
	EditableTextBoxWidget->SetText(Text);
}

```

**Update UE5.2.1** Above workaround does not work anymore, the getter will return an empty value.  
The story continues \> [[UE5.2.1, Bug report] EditableTextBox broke further. GetText not returning set value.](https://forums.unrealengine.com/t/ue5-2-1-bug-report-editabletextbox-broke-further-gettext-not-returning-set-value/1213966)

---

_[View the full topic](https://forums.unrealengine.com/t/bugs-bugs-bugs-slate-widget-synchronization/738172)._
