I am building a canvas app. I have several containers, each of which hold various controls.
the tree view looks something like this
Container1
Label1
Lable2
Lable3
Label4
Container1_1
Label1_1
Label1_2
If I wanted to set the width Label1 to the width of Container1, I would write the formula: Parent.Width within the width attribute for Label1
But, what I actually want to do is set the container width based on the widest control, something like: Max(Self.Children.Width) within the width attribute for Container1
Is this possible? I don't see any collections that reference Children or Controls within the formulas available.
Solved! Go to Solution.
Hi @Waveflux ,
You could try this formula on Width property of container control.
Max(Label1.Width,Label2.Width, Label3.Width,……,…….)
Please note that the width of the child control cannot exceed the width of the container.
Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.
Thanks for replying. While your method would work, it requires that I list every control individually. I'm asking to see if there is a relative identifier for the children of a control, much like Parent is the relative identifier for the parent of a control.
If there isn't, I'll have to either use your method or set it manually.
Hi @Waveflux ,
You could try this formula on Width property of container control.
Max(Label1.Width,Label2.Width, Label3.Width,……,…….)
Please note that the width of the child control cannot exceed the width of the container.
Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.
Thanks for replying. While your method would work, it requires that I list every control individually. I'm asking to see if there is a relative identifier for the children of a control, much like Parent is the relative identifier for the parent of a control.
If there isn't, I'll have to either use your method or set it manually.
User | Count |
---|---|
168 | |
96 | |
79 | |
72 | |
59 |
User | Count |
---|---|
209 | |
167 | |
98 | |
95 | |
78 |