Autor Beitrag
kiwicht
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1021

Win 7, MacOS
Delphi x, VBA, PHP, ...
BeitragVerfasst: Fr 21.03.03 11:17 
Hallöle...

folgendes:

benutze in meinem Hauptformular eine Query.

In einer unter "Implementation" eingebundenen Unit, und dort in einer Prozedur, werden dann die Felder dieser Query ausgerichtet.
Diese Prozedur rufe ich vom Hauptformular beim Programmstart auf.

Hier die Procedure in Kurzform, wie ich sie in meiner Unit "initmyDBs" gespeichert habe...


ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
procedure initDB;
begin

with MainForm do begin
with gridDB do begin
Columns[0].FieldName := 'artikel';
[...] etc. pp.
end; //with grid

dbedit1.DataField := 'text';
[..] etc. pp.

with Query1 do begin
FieldByName('text').Alignment := taLeftJustify;
end; // with Query

end; // with MainForm

end; // proc

Tja, und bei taLeftJustify sag mir Delphi dann folgendes:
ausblenden Quelltext
1:
[Error] initDB.pas(49): Undeclared identifier: 'taLeftJustify'					


Und das obwohl auch die MainForm korrekt eingebunden ist, und ich ja andere Objekte der MainForm ohne weiteres ansprechen kann, warum aber nicht taLeftJustify??

vielen Dank für eure Mühen

mfg
ao
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 145

Win XP Prof.
D7 Ent.
BeitragVerfasst: Fr 21.03.03 11:32 
Hallo,

versuch's mal, indem du zur Uses-Liste deiner Unit "initmyDBs" die Unit Classes hinzufügst.

Gruß
Andreas
kiwicht Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1021

Win 7, MacOS
Delphi x, VBA, PHP, ...
BeitragVerfasst: Fr 21.03.03 12:43 
:D ...


DANKE! Funktioniert!

mfg