-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdlg_params.pas
62 lines (43 loc) · 1014 Bytes
/
dlg_params.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
unit dlg_params;
//Lazzy Image Viewer
//github.com/PascalVault
//License: GNU/GPL
{$mode ObjFPC}{$H+}
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls;
type
{ TParamsDlg }
TParamsDlg = class(TForm)
Button1: TButton;
Label1: TLabel;
ScrollBar1: TScrollBar;
procedure Button1Click(Sender: TObject);
procedure ScrollBar1Change(Sender: TObject);
private
public
TheMin, TheMax, TheVal: Integer;
procedure Setup;
end;
var
ParamsDlg: TParamsDlg;
implementation
{$R *.lfm}
{ TParamsDlg }
procedure TParamsDlg.ScrollBar1Change(Sender: TObject);
begin
TheVal := ScrollBar1.Position;
Label1.Caption := IntToStr(TheVal);
end;
procedure TParamsDlg.Setup;
begin
ScrollBar1.Max := TheMax;
ScrollBar1.Min := TheMin;
ScrollBar1.Position := TheVal;
Label1.Caption := IntToStr(TheVal);
end;
procedure TParamsDlg.Button1Click(Sender: TObject);
begin
Close;
end;
end.