Autor Beitrag
rizor
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 209

WIN XP
Delphi 2005 PE, Visual C++
BeitragVerfasst: Mi 14.02.07 11:26 
Hi,

Ich habe eine zweite Form erstellt, in der zwei Labels den Text ausgeben sollen.
Ein Label hat schon einen vorgefertigten Text.

Die Labels werden aber nicht angezeigt.

Ich weiß nicht wieso.

ausblenden Delphi-Quelltext
1:
2:
Form2.LGesamt.Caption := 'Gesamtfortschritt:';
Form2.LEinzel.Caption := Bearbeitung;


Bearbeitung wird immer aus Form1 übergeben.

Wieso geht es nicht?
Kroko
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1284

W98 W2k WXP
Turbo D
BeitragVerfasst: Mi 14.02.07 11:29 
(a) weil visible auf false steht?
(b) weil Application.ProcessMessages fehlt
(c) ???

_________________
Die F1-Taste steht nicht unter Naturschutz und darf somit regelmäßig und oft benutzt werden! oder Wer lesen kann, ist klar im Vorteil!
rizor Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 209

WIN XP
Delphi 2005 PE, Visual C++
BeitragVerfasst: Mi 14.02.07 11:49 
nee, visible ist true
und was ist application.processmessage?
Snoopie
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33

XP Prof
D7 Ent
BeitragVerfasst: Mi 14.02.07 12:06 
... und anschließendes Form2.Repaint ?

_________________
Snoopie
Danniolo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 693



BeitragVerfasst: Mi 14.02.07 12:16 
Wenn der Fortschritt von z.B. einer Schleife angezeigt werden soll musst du Application.ProcessMessages aufrufen, damit deine Programmoberfläche (und damit auch das Label) aktualisiert wird.
Ich würde dir allerdings aus Performance-Gründen nicht bei jedem Schleifendurchlauf die gesamte Oberfläche zu aktualisieren -- dann ist man zwar stets über den Fortschritt informiert, allerdings dauert alles sehr viel länger. Besser ist es, wenn du z.B. nur nach jedem 10. Aufruf die PRogrammoberflächse (und auch den Inhalt des Labels) aktualisierst.
Kroko
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1284

W98 W2k WXP
Turbo D
BeitragVerfasst: Mi 14.02.07 12:17 
user profile iconrizor hat folgendes geschrieben:
...
und was ist application.processmessage?

(a) sorry, es muss Application.ProcessMessages heißen, und es macht genau das, wie es heißt, alle Botschaften der Application werden abgearbeitet, d.h. auch die Botschaft von Form2 die Labels neu zu zeichnen!

_________________
Die F1-Taste steht nicht unter Naturschutz und darf somit regelmäßig und oft benutzt werden! oder Wer lesen kann, ist klar im Vorteil!
rizor Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 209

WIN XP
Delphi 2005 PE, Visual C++
BeitragVerfasst: Mi 14.02.07 15:34 
Super, danke.
Das hat mir geholfen