Registriert seit: 14. Feb 2019
102 Beiträge
|
AW: Dynamische Scrollbox
23. Jul 2019, 14:31
Was mache ich falsch?
Delphi-Quellcode:
unit Unit1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls;
type
TForm1 = class(TForm)
ScrollBox1: TScrollBox;
Image1: TImage;
procedure FormActivate(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormActivate(Sender: TObject);
begin
ScrollBox1.Align:=alClient;
ScrollBox1.HorzScrollBar.Visible:=true;
image1.Align:=alnone;
image1.Left:=0;
image1.Top:=0;
image1.Stretch:=false;
image1.center:=false;
image1.Picture.Bitmap.Width:=900;
image1.Picture.Bitmap.Height:=900;
image1.Canvas.Rectangle(600,600,800,800);
end;
end.
|
|
Zitat
|