Subversion Repositories spacemission

Rev

Rev 15 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 daniel-mar 1
unit LevOptions;
2
 
3
interface
4
 
5
uses
6
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
7
  StdCtrls, ExtCtrls, Spin, ComCtrls;
8
 
9
type
10
  TLevelForm = class(TForm)
11
    ElPopupButton1: TButton;
12
    ElPopupButton2: TButton;
13
    GroupBox1: TGroupBox;
14
    Label1: TLabel;
15
    Panel1: TPanel;
16
    ElLabel1: TLabel;
17
    ElLabel2: TLabel;
18
    GroesseEdt: TEdit;
19
    Groesse: TUpDown;
20
    procedure ElPopupButton1Click(Sender: TObject);
21
    procedure ElPopupButton2Click(Sender: TObject);
22
    procedure FormHide(Sender: TObject);
23
    procedure FormShow(Sender: TObject);
24
    procedure GroesseClick(Sender: TObject; Button: TUDBtnType);
25
    procedure GroesseEdtKeyPress(Sender: TObject; var Key: Char);
26
    procedure GroesseEdtChange(Sender: TObject);
27
  public
28
    procedure Aktualisieren;
29
  end;
30
 
31
var
32
  LevelForm: TLevelForm;
33
 
34
implementation
35
 
36
uses LevMain;
37
 
38
{$R *.DFM}
39
 
40
procedure TLevelForm.Aktualisieren;
41
begin
42
  Groesse.Position := MainForm.ScrollBar.Max;
43
end;
44
 
45
procedure TLevelForm.ElPopupButton1Click(Sender: TObject);
46
begin
47
  MainForm.ScrollBar.Max := Groesse.Position;
48
  MainForm.AnzeigeAct;
49
  close;
50
end;
51
 
52
procedure TLevelForm.ElPopupButton2Click(Sender: TObject);
53
begin
54
  close;
55
end;
56
 
57
procedure TLevelForm.FormHide(Sender: TObject);
58
begin
59
  mainform.dxtimer.enabled := true;
60
end;
61
 
62
procedure TLevelForm.FormShow(Sender: TObject);
63
begin
64
  mainform.dxtimer.enabled := false;
65
end;
66
 
67
procedure TLevelForm.GroesseClick(Sender: TObject; Button: TUDBtnType);
68
begin
69
  groesseedt.Text := inttostr(groesse.position);
70
end;
71
 
72
procedure TLevelForm.GroesseEdtKeyPress(Sender: TObject; var Key: Char);
73
begin
74
  if not (Key in [#13, #08, '0'..'9']) then
75
    Key := #0;
76
end;
77
 
78
procedure TLevelForm.GroesseEdtChange(Sender: TObject);
79
begin
80
  groesse.Position := strtoint(groesseedt.text);
81
end;
82
 
83
end.