When creating a TButton dynamically at run time inside a TVertScrollBox. When I need to delete this button it will not disappear from the screen. This problem only occurs by running the application on Android (Windows works correctly).
To delete the buttons created at runtime inside the TVertScrollBox I execute this routine:
for i := vsScroll.ComponentCount-1 downto 0 do
if vsScroll.Components[i] is TButton then
TButton(vsScroll.Components[i]).Free;
How do I remove the created components?
NOTE: It's no use using TButton(vsScroll.Components[i]).Destroy
instead of Free
.