Autor Beitrag
delvieh
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 46

WinXP, Win98
D4 Standard, D7 Personal
BeitragVerfasst: Di 17.01.06 12:59 
Hi,

ich habe eine Komponente vom Typ TRichEdit abgeleitet, alles super soweit. :)
Nun möchte ich noch etwas Code ausführen wenn man MyRichEdit.Lines.Clear; aufruft.

Wie macht man das? Create, Paint, OnChange das weiß ich wie das geht.

Gruß Frank ;)
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Di 17.01.06 17:44 
du musst die ursprüngliche Clear; Methode mit deiner eigenen überschreiben.

_________________
In the beginning was the word.
And the word was content-type: text/plain.
delvieh Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 46

WinXP, Win98
D4 Standard, D7 Personal
BeitragVerfasst: Do 19.01.06 06:47 
Ok danke, mir ist nicht ganz klar wie das geht,
Will man die Funktion KeyPress erweitern macht man ja...

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
...
    procedure KeyPress(var Key: Char); override;
...

...
procedure TMyMemo.KeyPress(var Key: Char);
begin
  if FBolKeyLock and not FbolKeyUnlocked then begin
    Key:=#0;
    beep;
    exit;
  end;
  inherited;
end;


zum Beispiel... Nun das ist noch einfach... :)
Späterer Aufruf ist ja "MyMemo.KeyPress"

Wie gehts mit "MyMemo1.Lines.Clear" ?

Gruß Frank
Martin1966
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1068

Win 2000, Win XP
Delphi 7, Delphi 2005
BeitragVerfasst: Do 19.01.06 11:01 
Du musst wahrscheinlich zwei Ableitungen machen. Einmal die Klasse die die Strings verwaltet und zum anderen die RichEdit Komponenten.

Kann dir aber leider mehr auch nicht sagen. :-(

Lg Martin

_________________
Ein Nutzer der Ecke ;-)