Autor Beitrag
Jakane
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 257



BeitragVerfasst: Mi 29.05.13 13:55 
Hallo liebe Delphi-Helfer :)

ich wollte grade eine neue Komponente basteln:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
constructor TJTabellenDB.Create(AOwner: TComponent);
var
  Pfad : String;
  f, c : Integer;
  Panelkopf, Panel : TPanel;
  Liste : TListBox;
begin
  inherited;
  // Objekterstellung
  Panelkopf:= TPanel.Create(Self);
  Panelkopf.Parent:= Self;
  Panelkopf.Height:= 20;
  Panelkopf.BevelWidth:= 1;
  Panelkopf.Align:= alTop;
  Panelkopf.Caption:= '';
  // Titelpanel
  Panel:= TPanel.Create(Self);
  Panel.Parent:= Panelkopf;
  Panel.Width:= 100;
  Panel.BevelWidth:= 1;
  Panel.Align:= alLeft;
  Panel.Caption:= 'P1';
  // Listen erstellen
  Liste:= TListBox.Create(Self);
  Liste.Parent:= Self;
  Liste.Width:= 100;
  Liste.Align:= alLeft;
//  Liste.Items.Add('S1');
end;


Der Code funktioniert prima, ich seh meine Komponente mit den Panels und der Listbox...
Aber wenn ich Liste.Items.Add('S1') entkommentiere, verschwindet meine Komponente bei Programmstart :(

Weiss einer wieso und wie ich das beheben kann?
WasWeißDennIch
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 653
Erhaltene Danke: 160



BeitragVerfasst: Mi 29.05.13 14:19 
Da es sich anscheinend um Composite Controls handelt, möchte ich Dir dieses Video von Ray Konopka ans Herz legen: video.codegear.com/C...ositeVclControls.zip
Jakane Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 257



BeitragVerfasst: Mi 29.05.13 14:41 
user profile iconWasWeißDennIch hat folgendes geschrieben Zum zitierten Posting springen:
Da es sich anscheinend um Composite Controls handelt, möchte ich Dir dieses Video von Ray Konopka ans Herz legen: video.codegear.com/C...ositeVclControls.zip


Ìn dem Zip ist kein Video.
Ist die Antwort auf das Problem so kompliziert?
WasWeißDennIch
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 653
Erhaltene Danke: 160



BeitragVerfasst: Mi 29.05.13 14:52 
Oh doch, da ist ein Flash-Video enthalten, einfach das Archiv in ein Verzeichnis entpacken und die HTML-Datei öffnen (installierter Flashplayer vorausgesetzt). Du kannst es Dir nun ansehen und abkupfern, wie kommerzielle Komponentenautoren so etwas realisieren, oder selbst herumexperimentieren und an bestimmten Punkten scheitern. Ich persönlich würde es zunächst mit der ersten Variante versuchen ;)

[edit] Hast Du den Haken bei "Bei Delphi-Exceptions stoppen" herausgenommen? Es kommt nämlich eine Exception hoch ("Element hat kein übergeordnetes Fenster"), und da dies im Konstruktor geschieht, räumt Delphi brav wieder auf. [/edit]
Jakane Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 257



BeitragVerfasst: Mi 29.05.13 15:08 
gibts das video auch auf deutsch? :(
WasWeißDennIch
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 653
Erhaltene Danke: 160



BeitragVerfasst: Mi 29.05.13 15:18 
Leider nein, sonst hätte ich das verlinkt.
Jakane Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 257



BeitragVerfasst: Fr 31.05.13 09:54 
mein englisch ist schlecht.
daher versteh ich wohl das video zuwenig als es als lösungsansatz zu verwenden.

problem steht immernoch
WasWeißDennIch
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 653
Erhaltene Danke: 160



BeitragVerfasst: Fr 31.05.13 10:02 
Kommt denn eine Exception hoch oder nicht?
Jakane Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 257



BeitragVerfasst: Fr 31.05.13 10:15 
nein, die komponente ist einfach nur nicht da
WasWeißDennIch
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 653
Erhaltene Danke: 160



BeitragVerfasst: Fr 31.05.13 10:21 
Wie schon neulich angedeutet scheinst Du bestimmte Exceptions innerhalb der IDE zu ignorieren, bei mir kommt nämlich eine. Verlagere doch die eine Zeile einfach ins Loaded- oder ein anderes geeignetes Ereignis, dann sollte es auch Ruhe haben.

Für diesen Beitrag haben gedankt: Jakane
Jakane Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 257



BeitragVerfasst: Fr 31.05.13 10:26 
ich seh was :D

danke