# How to fix size of editor utility widget?

**URL:** <https://forums.unrealengine.com/t/how-to-fix-size-of-editor-utility-widget/664065>\
**Category:** Editor Scripting\
**Tags:** Editor-Scripting, unreal-engine, UE4, question\
**Created:** [October 7, 2022, 4:11am UTC](https://forums.unrealengine.com/t/how-to-fix-size-of-editor-utility-widget/664065 "2022-10-07T04:11:04Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![baikgyul](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@baikgyul](https://forums.unrealengine.com/u/baikgyul)\
**Post date:** [October 7, 2022, 4:11am UTC](https://forums.unrealengine.com/t/how-to-fix-size-of-editor-utility-widget/664065/1 "2022-10-07T04:11:04Z")

</div>

Hi, I’m working on Editor Utility Widgets, it’s really annoying that if widget shows up, it doesn’t have fixed size. Is there a way to fix the size of widget? Or set maximum/ minimum size… ☹

---

<div class="post-metadata">

**Author:** ![tuatec](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@tuatec](https://forums.unrealengine.com/u/tuatec)\
**Post date:** [December 30, 2022, 12:29pm UTC](https://forums.unrealengine.com/t/how-to-fix-size-of-editor-utility-widget/664065/2 "2022-12-30T12:29:40Z")

</div>

I need the same feature. Did you find a solution?

---

<div class="post-metadata">

**Author:** ![crossmr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@crossmr](https://forums.unrealengine.com/u/crossmr)\
**Post date:** [March 30, 2023, 2:12pm UTC](https://forums.unrealengine.com/t/how-to-fix-size-of-editor-utility-widget/664065/3 "2023-03-30T14:12:00Z")

</div>

I’m looking for a solution to this as well if anyone has found one.

---

<div class="post-metadata">

**Author:** ![EJaworenko1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ejaworenko1/32/575974_2.png) [@EJaworenko1](https://forums.unrealengine.com/u/EJaworenko1)\
**Post date:** [May 11, 2023, 12:16am UTC](https://forums.unrealengine.com/t/how-to-fix-size-of-editor-utility-widget/664065/4 "2023-05-11T00:16:45Z")

</div>

Also looking for a solution

---

<div class="post-metadata">

**Author:** ![Vasmaster](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/vasmaster/32/695213_2.png) [@Vasmaster](https://forums.unrealengine.com/u/Vasmaster)\
**Post date:** [May 12, 2023, 9:25am UTC](https://forums.unrealengine.com/t/how-to-fix-size-of-editor-utility-widget/664065/5 "2023-05-12T09:25:03Z")

</div>

I had this problem and still technically do.  
But looking at how other editors work when scaling I tried to replicate that. I ended up using a bunch of parent border boxes with fixed anchors at a corresponding corner of my widget. This way scaling up and down the window somewhat keeps the proportions and interactive elements on screen. Check how the MRQ works at scaling the window. I hope I get the question right. If it’s something else, the excuse me for the confusion. Cheers,

---

<div class="post-metadata">

**Author:** ![SturdyPenguin](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sturdypenguin/32/909831_2.png) [@SturdyPenguin](https://forums.unrealengine.com/u/SturdyPenguin)\
**Post date:** [April 16, 2024, 7:08pm UTC](https://forums.unrealengine.com/t/how-to-fix-size-of-editor-utility-widget/664065/6 "2024-04-16T19:08:27Z")

</div>

I’m surprised there is no official solution yet. Well, I hope I can somehow bump this post. I too am facing this issue.

---

<div class="post-metadata">

**Author:** ![AlFaruh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AlFaruh](https://forums.unrealengine.com/u/AlFaruh)\
**Post date:** [October 1, 2024, 10:43am UTC](https://forums.unrealengine.com/t/how-to-fix-size-of-editor-utility-widget/664065/7 "2024-10-01T10:43:37Z")

</div>

still need an answer

---

<div class="post-metadata">

**Author:** ![xlman](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@xlman](https://forums.unrealengine.com/u/xlman)\
**Post date:** [November 5, 2024, 7:22am UTC](https://forums.unrealengine.com/t/how-to-fix-size-of-editor-utility-widget/664065/8 "2024-11-05T07:22:43Z")

</div>

It can be done!

You can find the window of the utility widget (SWindow) and resize it.  
This is how I do it:

```auto
	UEditorUtilitySubsystem* EditorUtilitySubsystem = GEditor->GetEditorSubsystem<UEditorUtilitySubsystem>();
	if(!EditorUtilitySubsystem) {return;}
	
	UEditorUtilityWidget* SpawnedMenu = EditorUtilitySubsystem->SpawnAndRegisterTab(MyUtilityWidget);
	
	SpawnedMenu->ForceLayoutPrepass();
	TSharedRef<const SWidget> CachedWidget = SpawnedMenu->GetCachedWidget()->AsShared();
	TSharedPtr<SWindow> TabWindow = FSlateApplication::Get().FindWidgetWindow(CachedWidget);
	
	//A Slight delay to make sure the widget is rendered
	FTimerHandle Timer;
	SpawnedMenu->GetWorld()->GetTimerManager().SetTimer(Timer, FTimerDelegate::CreateLambda([=]()
 {
TabWindow->Resize(TabWindow->ComputeWindowSizeForContent(
 CachedWidget->GetDesiredSize()));
 }),
.35, false);

```

---

<div class="post-metadata">

**Author:** ![TarlRaney](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tarlraney/32/1016964_2.png) [@TarlRaney](https://forums.unrealengine.com/u/TarlRaney)\
**Post date:** [November 21, 2024, 5:35am UTC](https://forums.unrealengine.com/t/how-to-fix-size-of-editor-utility-widget/664065/9 "2024-11-21T05:35:10Z")

</div>

Is there a BP version of this solution?

---

<div class="post-metadata">

**Author:** ![xlman](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@xlman](https://forums.unrealengine.com/u/xlman)\
**Post date:** [November 22, 2024, 6:02pm UTC](https://forums.unrealengine.com/t/how-to-fix-size-of-editor-utility-widget/664065/10 "2024-11-22T18:02:40Z")

</div>

Not that i know of. but in my project I exposed this function to BP. It’s a inside a plugin I’m selling at the moment on fab.
