Autor Beitrag
SuperS
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 102

Win XP Home, Win XP Prof, Win 98

BeitragVerfasst: Mi 18.02.04 18:03 
Wie kann man es machen, dass sich eine "Gauge" innerhalb einer bestimmten Zeit füllt?
Henry
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 619

WinXP Prof. SP3
D6 Prof.
BeitragVerfasst: Mi 18.02.04 20:01 
Hallo, versuch mal diese Möglichkeit.

Du Brauchst 1 Gauge, 1 Timer, und bei meinem Beispiel einen Button.


ausblenden volle Höhe Delphi-Quelltext
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:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  ExtCtrls, Gauges, StdCtrls;

type
  TForm1 = class(TForm)
    Gauge1: TGauge;
    Timer1: TTimer;
    Button1: TButton;
    procedure Timer1Timer(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;
  VAR wert : Integer;

implementation

{$R *.DFM}

procedure TForm1.Timer1Timer(Sender: TObject);

begin
 Wert := wert + 1;
 Gauge1.Progress := Wert;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin

 Timer1.Enabled := True;
end;

end.


Die Zeit kannst du über das Interval dses Timers verändern

_________________
mfg Henry
SuperS Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 102

Win XP Home, Win XP Prof, Win 98

BeitragVerfasst: Mi 18.02.04 21:01 
Thanks for the Tip 8)