cancel
Showing results for 
Search instead for 
Did you mean: 

Weird Container Resize Behavior

DSwea.1
Associate III

Can anyone please explain the thinking behind the weird and asymmetric behavior of resize/drag handles in TouchGFX containers? The click-drag behavior of the handles on the left and top sides is entirely different from that of the handles on the right and bottom sides.

I have a container with an object inside and I wish to drag the sides of the container to match the size of the object within:

0693W00000NpoBmQAJ.pngIf I drag the handles in the middle of the right or bottom sides, the result is exactly what I desire, with the sides moving closer to the box as I drag:

Right Drag Before

0693W00000NpoAeQAJ.pngRight Drag After

0693W00000NpoAtQAJ.pngBottom Drag Before

0693W00000NpoAUQAZ.pngBottom Drag After

0693W00000NpoB3QAJ.pngHowever, if I do exactly the same thing with the left and top sides, the container is made smaller, as before, but the object inside is also moved (eventually beyond the right and top borders) whie the distance between the side and the object remains constant:

Left Drag Before

0693W00000NpoAZQAZ.pngLeft Drag After

0693W00000NpoAoQAJ.pngTop Drag Before

0693W00000NpoAjQAJ.pngTop Drag After

0693W00000NpoAyQAJ.pngI've tried every conceivable combination of click + shift/ctrl/alt drag attempting to get the top and left drags to work as the bottom and right do, but to no avail. It appears that the only way to get what I want is to use a combination of first selecting and dragging all objects within the container to square with the top-left corner, then dragging the right and bottom sides to square with the objects. In a container with multiple objects and irregular placement, this is both tedious and difficult---it would be so much simpler if the drag behavior were as one expects.

I really can't think of any reason why this strange behavior is desirable. Please advise if I've missed some fundamental point.

1 REPLY 1
Yoann KLEIN
ST Employee

Hello @DSwea.1​ ,

The reason the container behaves that way is because, in TouchGFXDesigner, the constraints of container are defined as Top and Left by default. That means that the child widget (a box in your case) will follow the Top-Left corner of its parent container.

Unfortunately, for the moment, there is no way to modify the constraints of container in TouchGFXDesigner.

/Yoann

Yoann KLEIN
ST Software Developer | TouchGFX