How to use SCanvas?

I have SItemSlot CompoundWidget and I want to create SCanvas and place on it N x M SItemSlots to make a Grid. I am looking for:

  1. How to add SItemSlot in SCanvas in a for loop?
  2. How to set SItemSlot size?
  3. How to set SItemSlot position in SCanvas equal (XSize_X, YSize_Y) where X, Y are column and row index respectively?

Okey, that I found.

  1. Step - Create SCanvas and write it to variable.
ChildSlot
	[
	    SAssignNew(Canvas,SCanvas)
	];
  1. Step → Fill Canvas using my slates
for(int i = 0; i < Width; i++){
	    for(int k = 0; k < Height; k++){
	        SCanvas::FSlot& TMP_SLOT = Canvas->AddSlot()
	        [
                SNew(SItemSlotSlate)
            ];
            TMP_SLOT.Position(FVector2D(i * 50, k * 50));
            TMP_SLOT.Size(FVector2D(45, 45));
	    }
	}

SCanvas has method AddSlot() which returns SCanvas::FSlot . You can see all methods in SCanvas.h.

Also in that method you can see the implementation of SCanvas::FSlot with available methods or you can read the documentation of SCanvas::FSlot here: FSlot | Unreal Engine Documentation

Result: