(Gast)
n/a Beiträge
|
Re: onchange Procedure für einen Booleanvariable?
17. Mai 2007, 19:51
Delphi-Quellcode:
type
TDieKlasse = class
private
fBoolVar: Boolean;
FOnBoolVarChanged: TNotifyEvent;
procedure SetBoolVar(Value: Boolean);
public
property BoolVar: Boolean read fBoolVar writer SetBoolVar;
property OnBoolVarChanged: TNotifyEvent read FOnBoolVarChanged write FOnBoolVarChanged;
end;
...
procedure TDieKlasse.SetBoolVar(Value: Boolean)
begin
if ( fBoolVar <> Value ) then
begin
fBoolVar := Value;
if assigned(FOnBoolVarChanged) then
FOnBoolVarChanged(Self);
end;
end;
|
|
Zitat
|