Best way to dynamically reposition a Slate widget?

Hi guys,

Slate widgets are aligned/positioned automatically using container widgets like VerticalBox or HorizontalBox. If you want to control exact position of a widget you can for example create a new window and put your widget inside this window. SWindow has MoveWindowTo() method that is what you are looking for.

So here is a very raw code that should help you moving your widget:

// create actual window with helper function (you can actually use `SNew(SWindow)` if you want but its just easier to use CursorDecorator)
TSharedPtr<SWindow.> MyWidgetWindow = SWindow::MakeCursorDecorator();

// Add widget you want to display to the window
MyWidgetWindow->SetContent( _Your_widget_here_);

// Add window to Slate but dont show it yet!
FSlateApplication::Get().AddWindow(MyWidgetWindow.ToSharedRef(), false);

Now you can move/show/hide MyWidgetWindow with functions like MoveWindowTo, ShowWindow, HideWindow

Hope that helps ; )