I have to know number of controls placed inside a TFramedScrollBox control container.
When I use the code TFramedScrollBox.ControlsCount. It always return the value 2. Why?
I want to use the for loop and iterate through each control and set a few properties. As the number of controls returned is always 2 I am not able to iterate through each control contained inside TFramedScrollBox.
How to solve this problem?
The FMX
TFramedScrollBox(as well asTScrollBox) has a propertyContent: TScrollContentwhich holds the added controls. UseContent.Controlsto list the controls.For example:
Edit:
To answer the question "why
TFramedScrollBox.ControlsCountalways returns 2?:The two components indicated by
TFramedScrollBox.ControlsCountand which can be accessed viaTFramedScrollBox.Controlsare aTLayoutand aTScrollContent. The latter being theContentthat holds the child controls.