The new horizontal container control has a property 'Flexible width', which when enabled will allow the container to be responsive and scale to the size of the window. Anything within the container will need to know the width to size its controls accoringly. Parent.Width does not return a dynamic value for the width of the container. How can I access the current width of a flexible width container?
Hi @Anonymous ,
Could you tell me:
Do you want the controls in the container to get the dynamic x coordinate of the container?
If so ,use the formula ‘Parent.X’ can work. As the picture below:
If you do not want to get the X coordinate of the container, but want to get the X coordinate of the control in the container,
I'm afraid this can't be achieved. When the control is put into the container, the X property of the control is invalid.
If you have any ideas or suggestions, you can post them on the following websites:
https://powerusers.microsoft.com/t5/Ideas/ct-p/PA_Comm_Ideas
If you have other questions, please tell me your needs in more detail, and I will be happy to solve the problem for you.
Best Regards,
Wearsky
Yes that does work, my mistake, what is not working is getting the X coordinates of a control in a horizontal container.
Hi @Anonymous ,
I'm sorry I don't know if I understand your needs, could you tell me if my assumptions are correct?
If so , I made a test and achieved it.
1\ I create a horizontal container and insert a label into it.
Set label’s Text property to:
Parent.Width
2\ The result is as follows:
If my guess is wrong, please tell me your needs in more detail, and I will be happy to solve the problem for you.
Best Regards,
Wearsky