L
leway
Unregistered / Unconfirmed
GUEST, unregistred user!
type
TMyForm = class(TForm)
private
{Private declarations}
procedure MouseDown(Button: TMouseButton;
Shift: TShiftState; X, Y: Integer); override; //重載
public
{ Public declarations }
end;
procedure TMyForm.MouseDown(Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var
lab: TLabel;
begin
inherited;
lab:= Tlabel.Create(self);
lab.Parent:= self;
end;
運行報錯: Overriding virtual method 'TMyForm.MouseDowm' has lower visibility (private) than the base class 'TForm'(protected)
我想實現它該怎麼辦,請指教。謝謝!
TMyForm = class(TForm)
private
{Private declarations}
procedure MouseDown(Button: TMouseButton;
Shift: TShiftState; X, Y: Integer); override; //重載
public
{ Public declarations }
end;
procedure TMyForm.MouseDown(Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var
lab: TLabel;
begin
inherited;
lab:= Tlabel.Create(self);
lab.Parent:= self;
end;
運行報錯: Overriding virtual method 'TMyForm.MouseDowm' has lower visibility (private) than the base class 'TForm'(protected)
我想實現它該怎麼辦,請指教。謝謝!