Link to home
Start Free TrialLog in
Avatar of dolphin King
dolphin King

asked on

how can i delete one control based on its tagstring ?

I had this question after viewing Tvertscrollbox like a whatsapp layout delete messages.

this answer shows how to delete all CR := TCalloutRectangle inside Vertscrollbox

i wanted to delete only one TCalloutRectangle based on its tag string how can i do that ?
ASKER CERTIFIED SOLUTION
Avatar of Sinisa Vuk
Sinisa Vuk
Flag of Croatia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dolphin King
dolphin King

ASKER

why when i delete some times app crashes ?
Is it on windows or android? Can you catch exception (try .. except ... showmessage .. end)?
it is on android even try block did not catch any exception
i believe this was fmx problem it self
when you delete something always use a reverse loop ...

  for i := count-1 downto 0 do 
    // delete stuff

Open in new window


otherwise the counter goes beyond the end point