Autor Beitrag
s4lzh3r1ng
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38



BeitragVerfasst: Do 18.07.02 19:16 
Moin zusammen,

kann mir jemand sagen wie ich den Inhalt eines Memos in eine Variable speichere ? Welcher Variablentyp ist das ?

Vielen Dank 8)

_________________
:wink: s4lzh3r1ng :wink:
Horst
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 120



BeitragVerfasst: Do 18.07.02 19:54 
s4lzh3r1ng hat folgendes geschrieben:
Moin zusammen,

kann mir jemand sagen wie ich den Inhalt eines Memos in eine Variable speichere ? Welcher Variablentyp ist das ?

Vielen Dank 8)


Hallo, was meinst du mit Memos, die Komponente TMemo, da steht der Inhalt in Lines und das ist abgeleitet von TStrings, daß heißt du kannst den Inhalt an alle Komponeten mit einer TStrings-Variable übergeben,
z.B. Listbox1.items:=Memo1.lines;
ist dir damit geholfen :)
Visum
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 106



BeitragVerfasst: Do 18.07.02 20:19 
Wenn du aber wirklich in eine Variable speichern willst, holst du am besten eine TStringlist.

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
var SL:tStringList;
begin
...
SL:=tStringlist.create;
SL.addstrings(memo1.lines);
...
end;


mehr zur SL findest du in der DH

Gruß Visum
s4lzh3r1ng Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38



BeitragVerfasst: Do 18.07.02 21:27 
Jo, vielen Dank.

Jetzt weiß ich Bescheid . . .

_________________
:wink: s4lzh3r1ng :wink:
b.brecht
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 81



BeitragVerfasst: Do 18.07.02 22:16 
kannst natürlich auch simpel in einen String speichern;

ausblenden Quelltext
1:
2:
3:
4:
5:
procedure speichern;
var text:string;
begin
string:=Memo1.Text;
end;
DieHardMan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 19



BeitragVerfasst: Fr 19.07.02 07:23 
als ergänzung noch SL.free um den speicher wieder freizugeben.

_________________
Mahlzeit