Delphi-PRAXiS
Seite 2 von 3     12 3      

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/)
-   -   ListBox1.Items.LoadFromFile('test.txt'); (https://www.delphipraxis.net/99450-listbox1-items-loadfromfile-test-txt-%3B.html)

DeddyH 12. Sep 2007 18:06

Re: ListBox1.Items.LoadFromFile('test.txt');
 
Willst Du eine Leerzeile dazwischen oder was soll das heißen?

pstruh 12. Sep 2007 18:08

Re: ListBox1.Items.LoadFromFile('test.txt');
 
Moin, moin taktaki!
Ich warte immer noch auf deine Erklärung, was eine "moemische Idee" ist - mache doch zur Abwechslung mal die Anderen schlau ...
Gruß

Andreas L. 12. Sep 2007 18:08

Re: ListBox1.Items.LoadFromFile('test.txt');
 
Delphi-Quellcode:
aListBox.items[3] := aStringList.Strings[2];

shmia 12. Sep 2007 18:11

Re: ListBox1.Items.LoadFromFile('test.txt');
 
Zitat:

Zitat von taktaky
Delphi-Quellcode:
aListBox.items.Add(aStringList[2]); // so will ich nicht
aListBox.items[3].Add(aStringList[2]); // so wunschte ich, aber was fehlt ?

Delphi-Quellcode:
// ganz logisch, man muss erst mal dafür sorgen, dass genügend Zeilen vorhanden sind
while aListBox.Items.count <= 4 do
   aListBox.Items.Add('');

// und dann entweder
   aListBox.items[3] := aStringList[2];  // Zeile 4 (Index=3) komplett ersetzen
   aListBox.items[3] := aListBox.items[3] + aStringList[2]; // oder anhängen

taktaky 12. Sep 2007 18:14

Re: ListBox1.Items.LoadFromFile('test.txt');
 
Zitat:

Zitat von Andreas L.
Delphi-Quellcode:
aListBox.items[3] := aStringList.Strings[2];

Genau :firejump:
Delphi-Quellcode:
 _____        ___   __   _   _   _    _____ 
|  _  \     /   | |  \ | | | | / /  | ____| 
| | | |    / /| | |   \| | | |/ /   | |__   
| | | |   / / | | | |\   | | |\ \   |  __| 
| |_| |  / /  | | | | \  | | | \ \  | |___ 
|_____/ /_/   |_| |_|  \_| |_|  \_\ |_____|

taktaky 12. Sep 2007 18:19

Re: ListBox1.Items.LoadFromFile('test.txt');
 
Zitat:

Zitat von pstruh
Moin, moin taktaki!
Ich warte immer noch auf deine Erklärung, was eine "moemische Idee" ist - mache doch zur Abwechslung mal die Anderen schlau ...
Gruß

Langsam heisst komisch
Eilig heißt moemisch :mrgreen:

pstruh 12. Sep 2007 18:24

Re: ListBox1.Items.LoadFromFile('test.txt');
 
Ahoj taktaki,
habe doch gleich geahnt, dass du Akademiker bist: Habe das Wort tatsächlich im Internet gefunden! Ich nehme alles zurück (hihihihi)

taktaky 12. Sep 2007 18:29

Re: ListBox1.Items.LoadFromFile('test.txt');
 
Zitat:

Zitat von shmia
Delphi-Quellcode:
// ganz logisch, man muss erst mal dafür sorgen, dass genügend Zeilen vorhanden sind
while aListBox.Items.count <= 4 do
   aListBox.Items.Add('');

// und dann entweder
   aListBox.items[3] := aStringList[2];  // Zeile 4 (Index=3) komplett ersetzen
   aListBox.items[3] := aListBox.items[3] + aStringList[2]; // oder anhängen

Danke! Mit deinem Vorschlag geht auch
Delphi-Quellcode:
 _____    _____    _   _   _____   _____ 
/  ___| |  _  \  | | | | /  ___/ /  ___/ 
| |     | |_| |  | | | | | |___  | |___ 
| |  _  |  _  /  | | | | \___  \ \___  \ 
| |_| | | | \ \  | |_| |  ___| |  ___| | 
\_____/ |_|  \_\ \_____/ /_____/ /_____/

taktaky 12. Sep 2007 19:19

Re: ListBox1.Items.LoadFromFile('test.txt');
 
Ich habe auch auf Form einen WebBrowser1

Quelltext in Webbrowser1:
Code:
<html>
<head>
<title>test</title>
</head>
<body>


<font size="7">
Hallo1</font></p>
</body>
</html>
Wie kann ich das Wort "hallo1" mit "hallo2" ersetzen?

oder einfach so :
Delphi-Quellcode:
webbrowser1.items(6):= aStringList[2]; // oder
:mrgreen:

DeddyH 12. Sep 2007 19:20

Re: ListBox1.Items.LoadFromFile('test.txt');
 
Gar nicht, da es nicht vorkommt :mrgreen:


Alle Zeitangaben in WEZ +1. Es ist jetzt 21:37 Uhr.
Seite 2 von 3     12 3      

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