x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

SNumericEntryBox error: use of undefined type in

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.

Product Version: Not Selected
Tags:
more ▼

asked Apr 22 '15 at 10:12 PM in C++ Programming

avatar image

Meowski
43 6 6 9

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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

more ▼

answered Apr 23 '15 at 10:00 AM

avatar image

Jamie Dale STAFF
7.5k 177 67 305

avatar image Meowski Apr 23 '15 at 11:09 AM

Thanks for putting up with such a simple problem!

That did the trick :)

avatar image TastyStock Dec 07 '18 at 07:49 PM

Thanks for asking a simple question. It turns out the numeric entry box api page has "Runtime/Slate/Public/SlateFwd.h" as the .h to use -- which wouldn't allow me to compile.

avatar image Jamie Dale STAFF Dec 10 '18 at 03:44 PM

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question