I understand your problem, but I wouldn't use the ListBox as playing list.
In the Change event of the listbox I'd add the selected song(s) to an array
if it's selected (and not in there already) and if the row is deslected I'd
remove it. Then I'd and play the array. If you doit your way, when the user
selects a row before the playing song it will be played before the previous
selected rows. If this is what you wan't you should do it your way, but if
you want the songs to be played in the order of selection you'll have to use
an array.

If you wan't to do it your way anyway, do this: ListBox.Selected(row as
Integer)=False

Maarten


On 23/06/06, Emile Schwarz <[EMAIL PROTECTED]> wrote:

Hi,

sorry, I forget to say one thing:

the ListBox is used as a play list, and once a song is played, its entry
have to be deselected automatically and the next  one (selected Row) in
the list starts. That is what is not working:

the Row is not de-selected, but I put code to do that.

Help!

Emile

>Subject: How do I de-select a Row in a ListBox ?
>From: Emile Schwarz <[EMAIL PROTECTED]>
>Date: Thu, 22 Jun 2006 17:54:25 +0200
>
>Hi,
>
>REALbasic 2006
>OS: LMW
>
>
>The question is a bit large, and I know how to deselect a Row in a
>ListBox. What I want to do is to deselect the Row once the song playing
>is over, but this does not works and the song is playing back again.
>
>Here's an idea of what the code does:
>
>The ListBox contains a list of songs, I select many songs. In a loop, I
>search in the whole ListBox the Selected Rows (from 0 to ListCount).
>Once I reach a selected Row, I play using the Sound Class the song. In
>the IsPlaying loop I placed the code to delect this particular Row (the
>one that is playing).
>
>I even added before the End If (if the Row is selected, no Else) that
>deselect code who works in MouseDown, no success... The same file is
>played again and again and again.
>
>I do not bother too much about that file playing and playing and playing
>again because I love that song, but I love other songs too; and hearing
>the same song a bit too much will do... ad nauseam!
>
>Any idea to achive my goal ?
>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to