2022-05-11 06:06 PM
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:
If 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
Right Drag After
Bottom Drag Before
Bottom Drag After
However, 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
Left Drag After
Top Drag Before
Top Drag After
I'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.
2022-05-12 01:24 AM
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