# \[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:** 8\
**Page:** 1

<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:** [December 29, 2022, 8:42am UTC](https://forums.unrealengine.com/t/bugs-bugs-bugs-slate-widget-synchronization/738172/1 "2022-12-29T08:42:36Z")

</div>

Not a question, just feedback.

Many slate (U) widgets use setter methods to set their style properties and then sync to their (S) widget. Take a look at a few of those (U) widgets and see how half the properties do not synchronize or have such a setter method. Calling SynchronizeProperties() Manually is not an option, because the slate classes do not check if it is safe to do so by testing if their (S) widget is valid. Checking if their (S) Widget is valid manually is not an option, because in some cases (throbber widget) that property is private.

I haven’t got many good things to say about slate’s current design but someone needs to fix the current implementation. Some properties set from the editor panel don’t even update until the widget is recompiled.

---

<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:** [January 4, 2023, 10:09am UTC](https://forums.unrealengine.com/t/bugs-bugs-bugs-slate-widget-synchronization/738172/2 "2023-01-04T10:09:20Z")

</div>

Post made for Unreal Engine 4.27. I see improvements in UE 5.1

---

<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:** [February 28, 2023, 2:29am UTC](https://forums.unrealengine.com/t/bugs-bugs-bugs-slate-widget-synchronization/738172/3 "2023-02-28T02:29:31Z")

</div>

UE5.1.1 it’s still ■■■, look at the list view and scroll box. unbelievable. Have to rebuild and synchronize a widget to update a single property.

---

<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)

---

<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:** [May 25, 2023, 3:31am UTC](https://forums.unrealengine.com/t/bugs-bugs-bugs-slate-widget-synchronization/738172/5 "2023-05-25T03:31:52Z")

</div>

UE5, text block visibility within an input key selector does not synchronize at all. Data lost on widget rebuild as well.

> [@\[UE5.1.1\] UInputKeySelector::SetTextBlockVisibility broken. Does not sync / sync on rebuild.](https://forums.unrealengine.com/t/ue5-1-1-uinputkeyselector-settextblockvisibility-broken-does-not-sync-sync-on-rebuild/1177644):
>
> Case: On UserWidget::PreConstruct you want to do UInputKeySelector::SetTextBlockVisibility on an inner widget. It can fail silently: void UInputKeySelector::SetTextBlockVisibility(const ESlateVisibility InVisibility) { if (MyInputKeySelector.IsValid()) { EVisibility SlateVisibility = UWidget::ConvertSerializedVisibilityToRuntime(InVisibility); MyInputKeySelector-\>SetTextBlockVisibility(SlateVisibility); } } Case: You want to set a few style properties in c++ on the widget. SetButtonS…

---

<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:** [June 5, 2023, 12:28am UTC](https://forums.unrealengine.com/t/bugs-bugs-bugs-slate-widget-synchronization/738172/6 "2023-06-05T00:28:16Z")

</div>

UE5.2 updates a bunch of slate widgets with new getters and setters, deprecating direct access to many properties. This is very good, because we need setters to sync Slate.

EPIC please test it properly because the editable text box and spinbox are already broken (see previous posts). Other than that, it’s good to see improvements on the synchronization process between Slate and UMG so that I am not forced to rebuild my widgets all the time after changing a single style property.

In 5.2, various getter / setter methods are still missing, though direct property access has already been deprecated. Please add these:

- ComboBoxKey::ForegroundColor;
- ComboBoxString::ForegroundColor;
- ComboBoxString::Font;
- UScrollBox::BackPadScrolling;
- UScrollBox::FrontPadScrolling;
- UScrollBox::NavigationScrollPadding;

For whatever reason there are two setters for this one, one is unsafe to call:

```auto
void UInputKeySelector::SetButtonStyle( const FButtonStyle* InButtonStyle )
{
	SetButtonStyle(*InButtonStyle);
}

```

---

<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:** [June 28, 2023, 4:58pm UTC](https://forums.unrealengine.com/t/bugs-bugs-bugs-slate-widget-synchronization/738172/7 "2023-06-28T16:58:56Z")

</div>

Another gift

> [[UE5.2, Bug report] Good job, you broke SetValue on the slider this time](https://forums.unrealengine.com/t/ue5-2-1-bug-report-good-job-you-broke-setvalue-on-the-slider-this-time/1213393)

---

<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:** [June 29, 2023, 2:16am UTC](https://forums.unrealengine.com/t/bugs-bugs-bugs-slate-widget-synchronization/738172/8 "2023-06-29T02:16:46Z")

</div>

> [[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)
