I have created a parentform and dynamically embedded with a array of frames, each containing a panel with a TSpeedButton.
My parentform has a database for information exchange and retrieval.
How do I get the attribute of which TSpeedButton I have clicked on when testing and passing it to the parentform so that the correct database access according to the button clicked is retrieved?
Even though the frames are embedded in the parentform, they do not seem to be able to communicate bi-directionally.
I have tried :
procedure TTestForm.FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
if Sender is TTestForm then
else if Sender is TSpeedButton then
//// if (Sender as TSpeedButton).HasParent = true then
Clicking on the parentform will pop up 'TestForm'; clicking on the embedded Frame TSpeedButton does not. Is there a way to get the handler of the clicked TSpeedButton and used it in the parentform?