No announcement yet.

Resizing UMG Widgets in Blueprint

  • Filter
  • Time
  • Show
Clear All
new posts

    Resizing UMG Widgets in Blueprint

    I want to resize a "Canvas Panel" via Blueprint.

    Let's assume I had the following hierarchy in the UMG editor:

    Click image for larger version

Name:	uehierarchy.png
Views:	991
Size:	18.8 KB
ID:	1656829

    And I wanted to change the size of the canvas panel. What I've tried so far is:

    Click image for larger version

Name:	ueresizemethod.png
Views:	1059
Size:	127.4 KB
ID:	1656830

    There is no direct "Resize" or "Set Size" method, instead the "Canvas Panel" seems to wrap its contents in "Canvas Slots".

    The above code always fails at the cast to "CanvasPanelSlot", however.

    Is there a way by which I could resize the canvas or a control contained therein?

    You need to go from the Vertical Box rather than the Canvas Panel for the slot. Then you can do what you're trying to do or use the "Slot as Canvas Slot" pure off the Vertical Box directly.
    Last edited by UntamedLoli; 08-25-2019, 03:07 PM.