When a user goes through a series of steps in my application a FRAME is dynamically generated to a Scrollbox and assigned a new name. On that frame there are all kinds of controls. One of the controls is a speedbutton with a little X in it (like the one at the top right of every window application). It is designed to do the same thing as the x on all windows apps; remove/close the frame. If someone clicks that little x, it should FREE the FRAME from the scrollbox. Now, I have been able to free the speedbutton of course.
Sender.free; makes the sender(TspeedButton) go away nicely (and someone comically. You push the delete button, and sure enough.. the button is deleted.. hehe)
The problem is, I need the whole frame to be free’d. The frame is dynamically named each time so I will have to use FindComponent I assume? Not really sure..
So, in short. When a user clicks TspeedButton on my dynamically generated Frame. I need that frame to disappear.
Note, Speedbutton is parented to a panel which is right aligned to another panel, which in turn is TOP aligned to the frame.