Autor Beitrag
sPeeD2k5
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 72



BeitragVerfasst: Fr 08.09.06 21:36 
Wie Topic schon sagt, suche ich eine Möglichkeit die Anzahl der im Memofeld gespeicherten Zeilen zu ermitteln.

würd mich über hilfe freuen ;)
Ironwulf
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 733
Erhaltene Danke: 2



BeitragVerfasst: Fr 08.09.06 21:38 
ich habs bei mir so gemacht geht aber mit sicherheit einfacher

hier ist es auf 10 zeilen begrenzt
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
procedure TForm1.Memo1KeyPress(Sender: TObject; var Key: Char);
var i: Byte;
begin
  If (Memo1.Lines.Count = 10) And (key = #13) Then key:= #0;

  If Memo1.Lines.Count > 10 Then
  begin
    for i:= Memo1.Lines.Count - 1 DownTo 10 Do Memo1.Lines.Delete(i);
    key:= #0;
  end;
end;
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Fr 08.09.06 22:11 
Moin!

@user profile iconIronwulf: Bist du da nicht etwas über das Ziel hinausgeschossen? ;)

Er wollte doch eigentlich nur
user profile iconsPeeD2k5 hat folgendes geschrieben:
eine Möglichkeit die Anzahl der im Memofeld gespeicherten Zeilen zu ermitteln.

Also konkret:
ausblenden Delphi-Quelltext
1:
Memo1.Lines.Count					

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
Ironwulf
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 733
Erhaltene Danke: 2



BeitragVerfasst: Fr 08.09.06 22:22 
kp hat da jemand rum editiert? ich hab das anders in erinnerung oder mir weng was dazugedichtet ;D
sPeeD2k5 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 72



BeitragVerfasst: Fr 08.09.06 22:34 
Ok danke Leute funktioniert :)