Einzelnen Beitrag anzeigen

Benutzerbild von stahli
stahli

Registriert seit: 26. Nov 2003
Ort: Halle/Saale
4.337 Beiträge
 
Delphi 11 Alexandria
 
#10

Re: Element '' hat kein übergeordnetes Fenster

  Alt 8. Okt 2009, 11:40
Ich habe es jetzt mit einer Notlösung im Griff...

Delphi-Quellcode:
procedure ClearAllDcListBox(W: TWinControl);
var
  I: Integer;
begin
  if W is TdcListBox then
  begin
    (W as TdcListBox).Items.Clear;
  end;
  for I := 0 to W.ControlCount - 1 do
  begin
    if W.Controls[I] is TWinControl then
      ClearAllDcListBox(W.Controls[I] as TWinControl);
  end;
end;
Die proc rufe ich im OnClose-Ereignis der Formulare auf.

Eine allgemeine Lösung über ein Ereignis "ControlWirdNichtMehrAufDemBildschirmAngezeigt " wäre mir aber lieber...
Falls jemand einmal eine Lösung weiß, dann bitte her damit.

Stahli
  Mit Zitat antworten Zitat