Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi TStrings (https://www.delphipraxis.net/21081-tstrings.html)

faux 27. Apr 2004 19:10


TStrings
 
Hallo!

Kann man TStrings (Edit (sorry, hab das s vergessen)) im Quelltext editor erstellen?

zb (also so gehts nicht das weiß ich):

Delphi-Quellcode:
'String1', 'String2'

sCrAPt 27. Apr 2004 19:15

Re: TStrings
 
Delphi-Quellcode:
var
  s: string;
begin
  s := 'hallo';
end;
jetzt hab ich nen string im editor gemacht :?

:angle:, sCrAPt

CalganX 27. Apr 2004 19:46

Re: TStrings
 
Hi,
verwende TStringList (ist praktisch das gleiche, nur funktionstüchtiger) und es geht wie folgt:
Delphi-Quellcode:
var
  slStringList: TStringList;

// ...
slStringList := TStringList.Create;
try
  // arbeite mit der StringListe.
  // Beispiel:
  slStringList.Add('blubbel');
  slStringList.Add('blubb');
  slStringList.SaveToFile('C:\Somewhere\it\belongs.to');
finally
  slStringList.Free;
end;
// ...
Beantwortet das deine Frage?

Chris

himitsu 27. Apr 2004 19:47

Re: TStrings
 
Schau dir mal die eigenschaften TStrings.Text, oder TStrings.CommaText an - damit dürfte es gehn.

faux 27. Apr 2004 19:50

Re: TStrings
 
ok, danke hat geklappt


Alle Zeitangaben in WEZ +1. Es ist jetzt 17:42 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz