Autor Beitrag
Insignificant
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 81



BeitragVerfasst: Mo 09.01.06 08:48 
Hi, ich versuche ein TRichEdit Feld zu erstellen was auch wunderbar klappt bis ich die Farbe, Color setzten will. Danach bekomme ich folgenden Fehler:

"Im projekt ist eine Exception der Klasse Einvalid Operation aufgetreten. Medlung: 'Element " hat kein übergeordnetes Fenster'. "

ausblenden volle Höhe 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:
30:
31:
unit gsticky; 

interface 

uses 
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 
  Dialogs, ExtCtrls, StdCtrls, ComCtrls; 

type 
  Tsticky = class(TCustomControl) 
    constructor Create(AOwner: TComponent); override
    destructor Destroy; override
    procedure   Paint; override
  private 
    FirstDraw: boolean; 
    stickynote: TRichEdit; 
  public 
  end
constructor Tsticky.Create(AOwner: TComponent); 
begin 
inherited Create(Aowner); 
imageresDLL := LoadLibrary(PChar('imageres.dll')); 
  stickynote := TRichEdit.Create(self); 
  stickynote.Parent := Self; 
  stickynote.Enabled := true; 
  stickynote.Left := 60
  stickynote.Top := 10
  stickynote.Width := 80
  stickynote.Height := 45
  //stickynote.Color := clLime; 
  stickynote.BorderStyle := BsNone;


Kann mir dabei vielleicht jemand helfen? Mir wurde gesagt das liegt daran das irgendwo ein Parent nicht gesetzt wurde oderso? Aber so wirklich verstehen tu ich das nicht. Ich bitte drigenst um Hilfe.