Thema: Delphi onVariableChange?

Einzelnen Beitrag anzeigen

Benutzerbild von mirage228
mirage228

Registriert seit: 23. Mär 2003
Ort: Münster
3.750 Beiträge
 
Delphi 2010 Professional
 
#5

Re: onVariableChange?

  Alt 17. Mai 2004, 18:01
Hi,

ok, ich tue dir den Gefallen (Code aus der Unit1 eines neu erstellten Formulares Form1)

Delphi-Quellcode:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs;

type
  TForm1 = class(TForm)
    procedure FormCreate(Sender: TObject);
  private
    { Private-Deklarationen }
    FMyBoolVar: Boolean;

    procedure SetMyBoolVar(MyBoolVar: Boolean);
  public
    { Public-Deklarationen }
    property MyBooleanVar: Boolean read FMyBoolVar write SetMyBoolVar;

    procedure MyVarChanged;
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.SetMyBoolVar(MyBoolVar: Boolean);
begin
  FMyBoolVar := MyBoolVar;
  MyVarChanged;
end;

procedure TForm1.MyVarChanged;
begin
  ShowMessage('MyBooleanVar geändert!');
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  MyBooleanVar := True;
end;

end.
mfG
mirage228
David F.

May the source be with you, stranger.
PHP Inspection Unit (Delphi-Unit zum Analysieren von PHP Code)
  Mit Zitat antworten Zitat