Autor Beitrag
WEBSTER
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 94



BeitragVerfasst: Fr 23.09.05 19:24 
Salute,

ich habe viele dynamische Pannels auf einer ScrollBox.


ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
  with Self_Panels[i] do
      begin
         parent := Task_ScrollBox;
         width := 950;
         Height := 100;
         left := Int_Left_Panel_POS; 

         top := Int_Top_Panel_POS * 105;
         INC(Int_Top_Panel_POS);
 
         name := 'TASK_ID_' + Task_DataSet.fieldbyname('TASK_ID').AsString;
         caption := ''

         OnClick := GetTermin_ID;
      end;



Wenn ich nun in der ersten Schleife 10 Pannels erstelle, werden diese auch sauber angezeigt.

Wenn im zweiten Durchgang nur 5 Pannels erstellt werden, werden diese auch angezeigt. Leider bleiben die 5 Pannels aus der ersten Schleife immer noch auf dem Pannel.

Ich müsste sie eigentlich irgendwie mit

ausblenden Delphi-Quelltext
1:
Self_Panels[i].Free;					

entfernen.

Wie bekomme ich alle Pannels auf der ScrollBox auf einmal gelöscht, bevor ich dynamisch alle wieder neu erstelle?

THX
WEBSTER

Moderiert von user profile iconChristian S.: Code- durch Delphi-Tags ersetzt

_________________
Wer etwas anders macht, aber nicht besser, der sollte besser etwas anderes machen.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Sa 24.09.05 10:08 
dir könte scrollbox.componentcount und scrollbox.componentshelfen.

_________________
In the beginning was the word.
And the word was content-type: text/plain.
WEBSTER Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 94



BeitragVerfasst: Sa 24.09.05 11:07 
Salute,

danke für deine Tipps. Habe es aber bereis gelöst.
Ich erstelle einfach die Scrollbox auch dynamisch und free die dann wieder. Damit sind die darauf liegenden Pannels auch 100%ig gelöscht.



WEBSTER

_________________
Wer etwas anders macht, aber nicht besser, der sollte besser etwas anderes machen.