Board index » delphi » Re: Tlist problem

Re: Tlist problem


2003-09-22 04:20:10 AM
delphi209
Steve writes:
Quote
I have a listbox that I populated with a list of files. How do I drag a
file to change
the order of the list, or have up and down buttons to move the files.
I need to create a List of MP3 files selcted from a directory then play
them in a certain order.
I have never tried with dragging, but you can use an up and down button,
and do something like (snipped from a program of mine):
procedure TPathfinderListForm.MoveUpBitBtnClick(Sender: TObject);
var
NewPos: Integer;
begin
with DirectoryListBox do
begin
if ItemIndex>0 then
begin
NewPos := ItemIndex - 1;
Items.Move(ItemIndex, NewPos);
ItemIndex := NewPos;
end;
end;
end;
And of course something similar for the down button.
But this question doesn't belong in this group. Followup set to
borland.public.delphi.vcl.components.using
--
Rudy Velthuis (TeamB)
"Never interrupt your enemy when he is making a mistake."
- Napoleon Bonaparte (1769-1821)
 
 

Re: Tlist problem

I have a listbox that I populated with a list of files. How do I drag a file
to change
the order of the list, or have up and down buttons to move the files.
I need to create a List of MP3 files selcted from a directory then play them
in a certain order.
 

Re: Tlist problem

"Steve" <XXXX@XXXXX.COM>writes
Quote
I have a listbox that I populated with a list of files. How do I drag a
file
to change
the order of the list, or have up and down buttons to move the files.
I need to create a List of MP3 files selcted from a directory then play
them
in a certain order.


Steve, I sent you a working example of what you've asked for, hopefully you
got it OK and this is just an old message{*word*154} around...
If you didn't get it and still want it, let me know and I will resend it.
Laurie..