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: TScrollContent
which holds the added controls. UseContent.Controls
to list the controls.For example:
Edit:
To answer the question "why
TFramedScrollBox.ControlsCount
always returns 2?:The two components indicated by
TFramedScrollBox.ControlsCount
and which can be accessed viaTFramedScrollBox.Controls
are aTLayout
and aTScrollContent
. The latter being theContent
that holds the child controls.