![]() |
Listbox1 + Caption +Listbox2 +Pfad
hallo...ich brauche hilfe
ich habe 2 listboxen. in listbox1 steht die caption für ein programm und in listbox2 steht der programmpfad. dann speichere ich beiden listboxen in zwei verschiedene dateien. mein problem ist: wenn ich listbox1 sortiert haben will (also sorted=true) dann klappt das mit dem pfad zum programm nicht mehr.
Delphi-Quellcode:
//das ist das speichern
procedure TForm2.Button2Click(Sender: TObject); begin if opendialog1.Execute= true then begin form1.listbox2.items.add(opendialog1.Filename); edit1.Text:= opendialog1.Filename; form1.listbox2.items.savetoFile(extractfilepath(application.exename)+ 'links.txt'); form1.listbox1.items.add(edit2.text); form1.listbox1.items.savetoFile(extractfilepath(application.exename)+ 'oben.txt'); //Button1.click; close; end; end; // das passiert beim klick in listbox1 procedure TForm1.ListBox1DblClick(Sender: TObject); var i: integer; s: string; begin for i := 0 to listbox1.items.count - 1 do begin s := listbox1.items[i]; if ListBox1.Selected[i] then begin ShellExecute(Handle, 'open', PChar(Listbox2.items[i]), nil, nil, SW_SHOWNORMAL); end; end; |
Re: Listbox1 + Caption +Listbox2 +Pfad
Ich würde einen Listview empfehlen.
|
Re: Listbox1 + Caption +Listbox2 +Pfad
geht das damit besser, wie muss ich das machen?
|
Re: Listbox1 + Caption +Listbox2 +Pfad
Ein Listview hat Spalten.
|
Re: Listbox1 + Caption +Listbox2 +Pfad
ja klar...stimmt ja ;)
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 15:27 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