# Integer spin box in widget?

**URL:** <https://forums.unrealengine.com/t/integer-spin-box-in-widget/464243>\
**Category:** UI\
**Tags:** integer, unreal-engine, UI, Widget, question\
**Created:** [April 25, 2020, 3:52pm UTC](https://forums.unrealengine.com/t/integer-spin-box-in-widget/464243 "2020-04-25T15:52:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Doomknight1401](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Doomknight1401](https://forums.unrealengine.com/u/Doomknight1401)\
**Post date:** [April 25, 2020, 3:52pm UTC](https://forums.unrealengine.com/t/integer-spin-box-in-widget/464243/1 "2020-04-25T15:52:37Z")

</div>

Hello, I wonder if there is any way to make a spin box increase and decrease its value by 1 instead of float comma values. I’ve been struggling with this for a while.

I want the user to be able to drag and pick 2, 3 or 4 players. Not 2.510565…

I’ve tried changing the delta value to 1 but no avail.

Some people had a similar post but changing the delta didn’t do the trick for me. The same goes for other projects and previous versions of the engine. I haven’t found any other information on how to do this. Any help would be very welcome. Thank you in advance!

![300555-ue4.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/c/a/3ca18d8ac8c01eb00e4cc4dfd90f63064bf954fc.jpeg)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [April 25, 2020, 8:25pm UTC](https://forums.unrealengine.com/t/integer-spin-box-in-widget/464243/2 "2020-04-25T20:25:47Z")

</div>

I know this is dumb but that’s one of those things UMG does not cater for.

 ![300584-annotation-2020-04-25-212151.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/f/e/5fe50a487cd5ec39e68786d8c95f066f9a1cc023.png)

Bind the _Display Float_ to the spinbox.

---

<div class="post-metadata">

**Author:** ![Doomknight1401](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Doomknight1401](https://forums.unrealengine.com/u/Doomknight1401)\
**Post date:** [April 25, 2020, 8:38pm UTC](https://forums.unrealengine.com/t/integer-spin-box-in-widget/464243/3 "2020-04-25T20:38:20Z")

</div>

Thanks a lot! That fixed it for me. It’s a dirty workaround indeed but as long as it works…  
The value still says “2.0” or “3.0” … instead of round numbers like 2 and 3 though, any idea? The main problem is fixed, I’m glad though so it’s fine.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [April 25, 2020, 8:52pm UTC](https://forums.unrealengine.com/t/integer-spin-box-in-widget/464243/4 "2020-04-25T20:52:25Z")

</div>

Ah you’re right. Spinbox seems to take floats only and can’t be bound to anything else. I’ll poke it but my gut feeling tells me it’s not going to budge.

A half decent alternative can be an overlay with a slider and a text box - should give you full control over formatting.

---

<div class="post-metadata">

**Author:** ![Doomknight1401](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Doomknight1401](https://forums.unrealengine.com/u/Doomknight1401)\
**Post date:** [April 25, 2020, 9:07pm UTC](https://forums.unrealengine.com/t/integer-spin-box-in-widget/464243/5 "2020-04-25T21:07:38Z")

</div>

Thanks for the suggestion and all your help, I’ll definitely have a look and see what else I can do to make it work or use a different method like your suggestion.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [April 25, 2020, 9:25pm UTC](https://forums.unrealengine.com/t/integer-spin-box-in-widget/464243/6 "2020-04-25T21:25:42Z")

</div>

You can force mouse delta to use step:

![300589-step.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/5/f/35fe06d9c9b47234886f2a8259b6c6412f7121ef.png)

and will end up with:

[![Image from Gyazo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/4/4/44492d3acdc140c6da19a2352294de91d22b8f0c.gif)](https://gyazo.com/b2ae5f37ae90369c3466ccff32f76241)

And text formatting as in the original example. In addition, you could place a progress bar underneath and read the value of a slider and push it into the progress bar - that should imitate what the spin box is showing but with way more granular control.

---

<div class="post-metadata">

**Author:** ![DocHansan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DocHansan](https://forums.unrealengine.com/u/DocHansan)\
**Post date:** [June 5, 2023, 3:32pm UTC](https://forums.unrealengine.com/t/integer-spin-box-in-widget/464243/7 "2023-06-05T15:32:49Z")

</div>

Change these parameters in the slider options

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/5/0/b506df5eb5ca0e1d3bc5f11b5f0fab8012e441b9.png)
