![]() |
Inis - Nur bestimmte Sections auflisten
Hallo,
nehmen wir mal an ich hätte folgende Sections in einder Ini Datei stehen. [Optionen] irgendeine=option [Section 01] aaa=aa [SectionDie2.] aa=aaa Wie kann man nun alle Sections bis auf die Option Section auflisten? --- Edit --- Zur Zeit mache ich es folgendermaßen.
Delphi-Quellcode:
Hier bei werden alerdings alle Sections aufgelistet.
Ini.ReadSections(ListBox.Items);
|
Re: Inis - Nur bestimmte Sections auflisten
Mache es wie folgend:
Delphi-Quellcode:
...:cat:...
ListBox.Items.BeginUpdate;
try Ini.ReadSections(ListBox.Items); I := ListBox.Items.IndexOf('Optionen'); if I >= 0 then ListBox.Items.Delete(I); finally ListBox.Items.EndUpdate; end; |
Re: Inis - Nur bestimmte Sections auflisten
Danke, klappt wunderbar.
|
Re: Inis - Nur bestimmte Sections auflisten
P.S.: Solltest Du ggf. vorhandene Items aus der Listbox löschen wollen, tue dieses innerhalb des try...finally Blockes ;-)
...:cat:... |
Alle Zeitangaben in WEZ +1. Es ist jetzt 15:28 Uhr. |
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