| | |
ListCtrl - Get All selected Items
Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
![]() |
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
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
Theist: It's okay, can you imagine anything else that doesn't exist?
Junior MD --- Python, C++ and PHP
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
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
python Syntax (Toggle Plain Text)
#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, "") self.file_list.append(full_tuple) #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.onSetPath() self.player.Play() self.slider.SetRange(0, self.player.Length()) self.player.SetVolume(0.404459081855) volume = str(self.player.GetVolume()) 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
Theist: It's okay, can you imagine anything else that doesn't exist?
Junior MD --- Python, C++ and PHP
![]() |
Other Threads in the Python Forum
- Previous Thread: Downloading thread code.
- Next Thread: Sockets will not close
| Thread Tools | Search this Thread |
address anydbm app beginner changecolor cipher class conversion coordinates corners curves definedlines development dictionary dynamic events examples excel feet file float format ftp function generator getvalue gui handling homework images import input ip java keycontrol line linux list lists loan loop maintain matching maze millimeter mouse mysqldb number numbers output parsing path permissions port prime programming projects py2exe pygame pymailer python queue random rational raw_input recursion recursive scrolledtext searchingfile shebang slicenotation split string strings table terminal text thread threading time tkinter tlapse tooltip tuple tutorial type ubuntu unicode url urllib urllib2 valueerror variable variables vigenere web windows wx.wizard wxpython xlwt






