| Код | unit Unit1;
interface
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;
type TcsForm = class(TForm) procedure RefreshData; virtual; private FScrollForm: boolean; procedure SetScrollForm(const Value: boolean); public constructor Create(AOwner: TComponent); override; published property ScrollForm:boolean read FScrollForm write SetScrollForm stored True; end; TForm1 = class(TcsForm) Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end;
var Form1: TForm1;
implementation
{$R *.dfm}
{ TcsForm }
constructor TcsForm.Create(AOwner: TComponent); begin inherited; // end;
procedure TcsForm.RefreshData; begin // end;
procedure TcsForm.SetScrollForm(const Value: boolean); begin ShowMessage('Value: ' + BoolToStr(Value, True)); end;
procedure TForm1.Button1Click(Sender: TObject); begin Self.ScrollForm := False; end;
end.
| |