Thema: Delphi Dynamische Scrollbox

Einzelnen Beitrag anzeigen

delphicoder123

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

AW: Dynamische Scrollbox

  Alt 22. Jul 2019, 20:59
Das wäre der zugehörige Code dazu.

Delphi-Quellcode:
an I implement this?
These questions are so important.

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
  left:=5;
  top:=10;
  form1.Width:=Screen.Width-15;
  form1.Height:=Screen.Height-50;
  ScrollBox1.Align:=alClient;
  image1.Left:=0;
  image1.Top:=0;
  image1.Width:=ScrollBox1.Width;
  image1.Height:=ScrollBox1.Height;
  image1.Canvas.Rectangle(1400,50,2000,100);
end;

end.
  Mit Zitat antworten Zitat