
Stian Søiland, IT 111, øvingsgruppe 15 (stud.ass. Kari Alvheim)

unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm1 = class(TForm)
Edit1: TEdit;
Button2: TButton;
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button2Click(Sender: TObject);
begin
if Edit1.Color = clRed then Edit1.Color := clBlue
else if Edit1.Color = clBlue then Edit1.Color := clGreen
else Edit1.Color := clRed;;
end;
end.