Hi,
I just want to know if it's possible to affect many buttons to a class.
For exemple, I would want to create a class module with many procedure like OnEnter, OnExit, OnClick...
Today If I want to do that, I can use a specific unit with my specifics procedures (OnEnter, click...) and I still have to add on all my buttons :
procedure TForm1.Button1Click(Sender: TObject);
begin
MyUnit.ClickTheButton(Sender);
end;
procedure TForm1.Button1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
MyUnit.MouseUp(Sender, Button, Shift, X, Y);
end;
It's really long...
How can I do with a class module to say "Button1 = MySPecificClass" and MySpecificClass could store all registered buttons to activate events as necessary ??
I hope that you could understand my need.
Thanks,