TCustomButton.Click is protected
Original Reporter info from Mantis: michael @mvancanneyt
-
Reporter name: Michael Van Canneyt
Original Reporter info from Mantis: michael @mvancanneyt
- Reporter name: Michael Van Canneyt
Description:
TCustomButton.Click is protected in the LCL.
In the VCL, TCustomButton.Click is public.
Seeing that TButton.Click just calls inherited, I think that the best solution is to make TCustomButton.Click public and remove the TButton.Click
Steps to reproduce:
- Drop button on form (Button1).
- Create function:
Function TForm1.GetCustomButton : TCustomButton;
begin
Result:=Button1;
end;
- Create OnShow event:
Procedure TForm1.OnShow(Sender : TObject)
Var
B : TCustomButton;
begin
B:=GetCustomButton;
if Assigned(B) then
B.Click;
end;
Fails in LCL, works in Delphi
Mantis conversion info:
- Mantis ID: 25870
- OS: All
- OS Build: Al
- Platform: All
- Version: 1.2.0
- Fixed in revision: r44451 (#e5758e1a)