ListCtrl - Get All selected Items

Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jun 2007
Posts: 1,389
Reputation: evstevemd has a spectacular aura about evstevemd has a spectacular aura about evstevemd has a spectacular aura about 
Solved Threads: 127
evstevemd's Avatar
evstevemd evstevemd is offline Offline
Nearly a Posting Virtuoso

ListCtrl - Get All selected Items

 
0
  #1
Nov 30th, 2008
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
Steve
Atheist: God is man made imagination, he doesn't exist!
Theist: It's okay, can you imagine anything else that doesn't exist?
Junior MD --- Python, C++ and PHP
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 1,389
Reputation: evstevemd has a spectacular aura about evstevemd has a spectacular aura about evstevemd has a spectacular aura about 
Solved Threads: 127
evstevemd's Avatar
evstevemd evstevemd is offline Offline
Nearly a Posting Virtuoso

Re: ListCtrl - Get All selected Items

 
0
  #2
Nov 30th, 2008
Sorry All,
I forgot to mention that it is wxpython.
Atheist: God is man made imagination, he doesn't exist!
Theist: It's okay, can you imagine anything else that doesn't exist?
Junior MD --- Python, C++ and PHP
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 1,389
Reputation: evstevemd has a spectacular aura about evstevemd has a spectacular aura about evstevemd has a spectacular aura about 
Solved Threads: 127
evstevemd's Avatar
evstevemd evstevemd is offline Offline
Nearly a Posting Virtuoso

Re: ListCtrl - Get All selected Items

 
0
  #3
Nov 30th, 2008
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

  1. #Loads playList to the List box with name, Format, directory
  2. def onLoadPlaylist(self):
  3. file_list_paths = self.paths
  4. self.file_list = []
  5.  
  6. for path in file_list_paths : # Non original
  7. filename_and_ext, directory = os.path.split(path)
  8. full_tuple = (path, directory, "")
  9. self.file_list.append(full_tuple)
  10. #Insert values in Col and Rows
  11.  
  12. #Insert values in Col and Rows
  13. for i in self.file_list:
  14. index = self.playlist.InsertStringItem(sys.maxint, i[0])
  15. self.playlist.SetStringItem(index, 1, i[1])
  16. self.playlist.SetStringItem(index, 2, i[2])
  17.  
  18.  
  19. # Get selected from list and set it path and reselect the next
  20. def onSetPath(self):
  21. index1 = self.playlist.GetFirstSelected()
  22. filename = self.playlist.GetItemText(index1)
  23. print filename
  24. self.path = filename
  25.  
  26. #play it
  27. def onPlay(self, evt):
  28. self.onSetPath()
  29. self.player.Play()
  30. self.slider.SetRange(0, self.player.Length())
  31. self.player.SetVolume(0.404459081855)
  32. volume = str(self.player.GetVolume())
  33. self.label.SetLabel("Vol: %s" %(volume,))
Atheist: God is man made imagination, he doesn't exist!
Theist: It's okay, can you imagine anything else that doesn't exist?
Junior MD --- Python, C++ and PHP
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Python Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC