Thema: Delphi Dynamische Scrollbox

Einzelnen Beitrag anzeigen

delphicoder123

Registriert seit: 14. Feb 2019
102 Beiträge
 
#16

AW: Dynamische Scrollbox

  Alt 23. Jul 2019, 14:22
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.

https://community.idera.com/developer-tools/programming-languages/
Füge mal hinzu:

Delphi-Quellcode:
  image1.Width:=900;
  image1.Height:=900;

Danke, euch beiden. Es hat geklappt.
  Mit Zitat antworten Zitat