Thema: Delphi Dynamische Scrollbox

Einzelnen Beitrag anzeigen

peterbelow

Registriert seit: 12. Jan 2019
Ort: Hessen
701 Beiträge
 
Delphi 12 Athens
 
#12

AW: Dynamische Scrollbox

  Alt 23. Jul 2019, 15:12
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;
Peter Below
  Mit Zitat antworten Zitat