Autor Beitrag
Nano-Ware
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 394
Erhaltene Danke: 7



BeitragVerfasst: Mo 11.10.10 19:36 
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:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
unit NewUser;

interface

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

type
  TFRM_NewUser = class(TForm)
    PAN_Statusbar: TPanel;
    IMG_Statusbar: TImage;
    LBL_StatusBar: TLabel;
    procedure FormCreate(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

  procedure SetStatusBar(Text : String; Typ : Integer);

var
  FRM_NewUser: TFRM_NewUser;

implementation

{$R *.dfm}

procedure TFRM_NewUser.FormCreate(Sender: TObject);
begin

end;





















////////////////////////////////////////////////////////////////////////////////
//Funktionen
////////////////////////////////////////////////////////////////////////////////


procedure SetStatusBar(Text : String; Typ : Integer);
begin

   LBL_StatusBar.Caption := Text;

end;

end.



Wieo wird LBL_Statusbar nicht erkannt, obwohl es in der Form enthalten ist?
platzwart
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1054
Erhaltene Danke: 78

Win 7, Ubuntu 9.10
Delphi 2007 Pro, C++, Qt
BeitragVerfasst: Mo 11.10.10 19:58 
Weil die Funktion SetStatusBar nicht zur TFRM_NewUser gehört ;)


ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TFRM_NewUser.SetStatusBar(Text : String; Typ : Integer);
begin
 LBL_StatusBar.Caption := Text;
end;


Und dann noch die Deklaration der Funktion in die Deklaration der Form reinpacken, dann funktioniert es ;) Oder aber folgende Variante:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure SetStatusBar(Text : String; Typ : Integer);
begin
 TFRM_NewUser.LBL_StatusBar.Caption := Text;
end;

_________________
Wissenschaft schafft Wissenschaft, denn Wissenschaft ist Wissenschaft, die mit Wissen und Schaffen Wissen schafft. (myself)

Für diesen Beitrag haben gedankt: Nano-Ware
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 11.10.10 19:59 
Deine Routine SetStatusBar ist keine Methode der Form-Klasse,
Nano-Ware Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 394
Erhaltene Danke: 7



BeitragVerfasst: Mo 11.10.10 20:48 
Vielen Dank^^