Autor Beitrag
MrCoder
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 65

WinXP, SuSE Linux
D7 Ent
BeitragVerfasst: Di 16.11.04 21:26 
Hallo zusammen,
das Problem heute: Ich habe eine Delphi-VCL-Kompo (=Steuerelement) geschrieben, die zwei Controls nämlich eine TListView und eine TToolbar haben. Die Kompo stellt die beiden unterkomponenten als Eigenschaften bereit:

ausblenden Delphi-Quelltext
1:
2:
3:
published
property List: TListView read FList write FList;
property Toolbar: TToolbar read FToolbar write FToolbar;


Das eigentliche Problem besteht darin, dass wenn ich die Kompo auf ein Formular setze und diverse Eigenschaften von den Unterkomponenten (TListView bzw. TToolbar) verändere die Änderungen zwar von Delphi akzeptiert werden, aber beim Starten des Programms sichtlich verschwinden.

Beispiel: Ich weise MeineKompo1.Toolbar.Images = ImageList1 per Objektinspektor zu und die Symbole werden auf den Buttons angezeigt. Aber beim Ausführen sind keine Symbole auf den Toolbuttons!

Hattet Ihr es auch schon mit solchen Problemen zu tun?
Bitte helft mir schnell, sonst werde ich hier nie fertig!!!

Danke im voraus,
MrCoder
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Di 16.11.04 23:28 
Versuch al, ob ein "Stored True" am Ende der Property-Deklaration was ändert,

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
MrCoder Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 65

WinXP, SuSE Linux
D7 Ent
BeitragVerfasst: Mi 17.11.04 18:55 
Hi,
daran scheint es nicht zu liegen. Vielleicht liegts am Konstruktor:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
constructor TTestComp.Create(AOwner: TComponent);
begin
  inherited;

  Parent := AOwner as TWinControl;

  FToolbar := TToolbar.Create(Self);
  FList := TListView.Create(Self);
  
  FToolbar.Parent := Self;
  FList.Parent := Self;
  
  FToolbar.Align := alBottom;
  FList.Align := alClient;
end;


Keine Ahnung, langsam verzweifle ich richtig.

Gruß,
MrCoder