I was playing with ListCtrl and I have only been able to get first value of the selected row. Is there any method I can use to get the rest of column's value in the selected row?
Help please

9 Years
Discussion Span
Last Post by Stefano Mtangoo

Let me explain a little bit. I have Frame with media ctrl and Listctrl
The List of media files get Loaded in List ctrl and when user double clicks the file, It get played in the media player.

I have now failed to get file name (I plan to concatenate file name and directory) but even when I try to explicitly tell media control to play given file in List, it stays quiet!

Any suggestion on way to Go getting element
Here are some problematic functions

#Loads playList to the List box with name, Format, directory
    def onLoadPlaylist(self):
        file_list_paths = self.paths        
        self.file_list = []
        for path in file_list_paths : # Non original
            filename_and_ext, directory = os.path.split(path) 
            full_tuple = (path, directory, "")
        #Insert values in Col and Rows
        #Insert values in Col and Rows
        for i in self.file_list:
            index = self.playlist.InsertStringItem(sys.maxint, i[0])
            self.playlist.SetStringItem(index, 1, i[1])
            self.playlist.SetStringItem(index, 2, i[2])
    # Get selected from list and set it path and reselect the next
    def onSetPath(self):
        index1 = self.playlist.GetFirstSelected() 
        filename = self.playlist.GetItemText(index1)     
        print filename
        self.path = filename

#play it
    def onPlay(self, evt):
        self.slider.SetRange(0, self.player.Length())
        volume = str(self.player.GetVolume())
        self.label.SetLabel("Vol: %s" %(volume,))
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.