unit UnitNix;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls;
type
TForm1 =
class(TForm)
ScrollBox1: TScrollBox;
PaintBox1: TPaintBox;
procedure PaintBox1Paint(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.PaintBox1Paint(Sender: TObject);
begin
//Diagonale zeichnen
PaintBox1.Canvas.MoveTo(1,1);
PaintBox1.Canvas.LineTo(PaintBox1.Width,PaintBox1.Height);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
PaintBox1.Height := ScrollBox1.Height * 2;
PaintBox1.Width := ScrollBox1.ClientWidth;
end;
end.