ВУЗ:
Составители:
Рубрика:
Button1: TButton; // Эта секция обслуживается Delphi
// Ее элементы доступны всем
private
// Эта секция доступна в модуле Uniti
FIntField: Integers
Procedure SetValue(Value: Integers);
Function GetValue: Integer;
published
// Эта секция доступна в любом модуле
Property IntField: read GetValue write SetValue;
protected // Эта секция доступна классам-потомкам
Procedure Proc1;
public // Эта секция доступна в любом модуле Procedure Proc2;
end;
var
Form1: TForm1;
Implementation Procedure TForm1.Proc1 ;
Button1.Color := clBtnFace;
// Так можно
FIntField := 0;
// Так можно
IntField := 0;
end;
begin
Form1.Button1.Color := clBtnFace; // Так можно
Form1.FIntField := 0; // Так можно
Form1.IntField := 0; // Так можно
Form1.Proc1; // Так нельзя!
Form1.Proc2; // Так можно
end.
Unit Unit2;
Interface
Uses Controls, Unit1;
type
TForm2 = class(TFormI)
Button2: TButton;
Procedure Button2Click(Sender: TObject);
end;
var
Form2: TForm2;
Implementation
Procedure TForm2.Button2Click(Sender: TObject);
begin
Button1.Color := clBtnFace; // Так можно
FIntField := 0; // Так нельзя!
IntField := 0; // Так можно
Proc1; // Так можно
Proc2; // Так можно
73
Страницы
- « первая
- ‹ предыдущая
- …
- 71
- 72
- 73
- 74
- 75
- …
- следующая ›
- последняя »
