Thank you very much.
However I am not sure what to pass to the geometry parameter.
I tried to pass the UImage geometry, but that didn’t work correctly.
FGeometry Geometry;
bool result = canvasPanel->GetGeometryForSlot(0, Geometry);
UComicViewerWidget::ScreenToWidgetLocal(this, Geometry, ViewportSize, newSize);//passing ViewportSize to get the lower right corner. this is UUserWidget reference
imageSlot->SetPosition(newSize);//I expect the image to disappear, because it's position is to the lower-right corner, with the anchor to the left upper corner, but it doesn't disappear, it just jumps around.
Is there a geometry associated with UUserWidget or UCanvasPanel? How can I get it?
My bad. The tick event takes FGeometry parameter, I used it and finally it worked!
Now I can position stuff relative to the upper left corner and size of the widget, which exactly what I needed.