- Interface
- Code Program
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, jpeg;
type
TForm1 = class(TForm)
Image1: TImage;
Panel1: TPanel;
CheckBox1: TCheckBox;
Label1: TLabel;
Label2: TLabel;
ScrollBar1: TScrollBar;
ScrollBar2: TScrollBar;
procedure CheckBox1Click(Sender: TObject);
procedure ScrollBar1Change(Sender: TObject);
procedure ScrollBar2Change(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.CheckBox1Click(Sender: TObject);
begin
if checkbox1.Checked then
image1.Stretch:=true else
image1.stretch:=false;
end;
procedure TForm1.ScrollBar1Change(Sender: TObject);
begin
image1.Height:=scrollbar1.Position+200;
end;
procedure TForm1.ScrollBar2Change(Sender: TObject);
begin
image1.Width:=scrollbar2.Position+300;
end;
end.
- Output
Tampilan ketika ukuran panjang dirubah.
Tampilan ketika ukuran lebar dirubah.
Tampilan ketika pilihan "Stretch" dicentang.
Tampilan ketika ukuran panjang dalam keadaan stretch dirubah.
Tampilan ketika ukuran lebar dalam keadaan stretch dirubah.
Untuk download programnya,, silahkan download (DISINI)
0 komentar:
Posting Komentar