# SNumericEntryBox  error: use of undefined type in

**URL:** <https://forums.unrealengine.com/t/snumericentrybox-error-use-of-undefined-type-in/316024>\
**Category:** UI\
**Tags:** UE4-7, unreal-engine, editor, slate, Widget, question, CPP\
**Created:** [April 22, 2015, 10:12pm UTC](https://forums.unrealengine.com/t/snumericentrybox-error-use-of-undefined-type-in/316024 "2015-04-22T22:12:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Meowski](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Meowski](https://forums.unrealengine.com/u/Meowski)\
**Post date:** [April 22, 2015, 10:12pm UTC](https://forums.unrealengine.com/t/snumericentrybox-error-use-of-undefined-type-in/316024/1 "2015-04-22T22:12:24Z")

</div>

Hi  
I’m having trouble declaring an SNumericEntryBox in Slate. Declaring other types of widgets seems to work (SButton, STextBlock etc)

Problem occured I believe when switching from Slate to SlateBasics.h

Please help! What am I missing here???  
Using 4.7.6 (latest hotfix)

This is for a plugin extending the editor.

```
.....
vertBox->AddSlot()
		.AutoHeight()
		[
			SNew(SHorizontalBox)
			+ SHorizontalBox::Slot()
			.VAlign(VAlign_Center)
			[
				SNew(STextBlock).Text(LOCTEXT("Category", "Name"))
			]
			+ SHorizontalBox::Slot()
				.VAlign(VAlign_Center)
					[
						
						SNew(SNumericEntryBox<int32>)
						.Value(this, &MyClassName::GetVariable)
						.OnValueChanged(this, &MyClassName::SetVariable)
						.AllowSpin(false)
						.LabelPadding(0)
						.MinValue(1)
						.MaxValue(100)
						]
					
		];

etc.
```

---

<div class="post-metadata">

**Author:** ![Jamie\_Dale](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jamie_dale/32/1165413_2.png) [@Jamie\_Dale](https://forums.unrealengine.com/u/Jamie_Dale)\
**Post date:** [April 23, 2015, 10:00am UTC](https://forums.unrealengine.com/t/snumericentrybox-error-use-of-undefined-type-in/316024/2 "2015-04-23T10:00:06Z")

</div>

`SNumericEntryBox` isn’t included by `SlateBasics.h` so you’ll need to include its header ( `SNumericEntryBox.h` ) yourself.

---

<div class="post-metadata">

**Author:** ![Meowski](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Meowski](https://forums.unrealengine.com/u/Meowski)\
**Post date:** [April 23, 2015, 11:09am UTC](https://forums.unrealengine.com/t/snumericentrybox-error-use-of-undefined-type-in/316024/3 "2015-04-23T11:09:01Z")

</div>

Thanks for putting up with such a simple problem!

That did the trick 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_91b492f1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_91b492f1](https://forums.unrealengine.com/u/anonymous_user_91b492f1)\
**Post date:** [December 7, 2018, 7:49pm UTC](https://forums.unrealengine.com/t/snumericentrybox-error-use-of-undefined-type-in/316024/4 "2018-12-07T19:49:47Z")

</div>

Thanks for asking a simple question. It turns out the numeric entry box [api page](https://api.unrealengine.com/INT/API/Runtime/Slate/SNumericEntryBox/index.html) has “Runtime/Slate/Public/SlateFwd.h” as the .h to use – which wouldn’t allow me to compile.

---

<div class="post-metadata">

**Author:** ![Jamie\_Dale](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jamie_dale/32/1165413_2.png) [@Jamie\_Dale](https://forums.unrealengine.com/u/Jamie_Dale)\
**Post date:** [December 10, 2018, 3:44pm UTC](https://forums.unrealengine.com/t/snumericentrybox-error-use-of-undefined-type-in/316024/5 "2018-12-10T15:44:20Z")

</div>

It looks like the documentation generator is picking up the forward declaration rather than the real type when listing the header to include. I’ve passed that on to the docs team to investigate.
