I have created three TButtons using a repititions structure.
The code look like this...
I cut down the code a bunch of course...Code:procedure ButtonClick(Sender: TObject); begin end; procedure LoadForm; var Form: TForm; Buttons: array of TButton; begin Form := CreateForm; with Form do begin Width := 500; Height := 300; end; SetLength(Buttons, 3); Captions := ['< Previous', 'Next >', 'Cancel', 'Install', 'Close']; for i := 0 to High(Buttons) do begin Buttons[i] := TButton.Create(Form); with Buttons[i] do begin Parent := Form; OnClick := @ButtonClick; end; end;
Now my question is, how do I tell which on of these buttons were clicked in the "ButtonClick" procedure?
Also, what kind of information can be pull from the "Sender" Object?
I read MasterKill's Big Form Tutorial, but I did not find a solution within it.
He did however talk about creating TButtons using a repitition structure.
Thank in Advance!



Reply With Quote





