Using the Slate Editor for user widget, you have access to the Size parameter. see image attached.
As I understand, this parameter is SizeParam.
/**
-
How much space this slot should occupy along panel’s direction.
-
When SizeRule is SizeRule_Auto, the widget’s DesiredSize will be used as the space required.
-
When SizeRule is SizeRule_Stretch, the available space will be distributed proportionately between
-
peer Widgets depending on the Value property. Available space is space remaining after all the
-
peers’ SizeRule_Auto requirements have been satisfied.
*/
FSizeParam SizeParam;
In the FSlot constructor I can see that this parameter is initialized as follow
FSlot()
: TSlotBase()
, SizeParam( FStretch(1) )
Now if I try to replicate this in my widget, it generates an error.
SNew(SHorizontalBox)
- SHorizontalBox::Slot()
.SizeParam(FStretch(1))
.VAlign(VAlign_Fill)
.HAlign(HAlign_Fill)
[
error C2064: term does not evaluate to a function taking 1 arguments
I don’t understand what is wrong here.
Txs for your help,
D.