From: Steven D'A. <st...@pe...> - 2013-09-18 04:48:57
|
On Wed, Sep 18, 2013 at 03:42:46AM +0000, Azam, Naweed wrote: > Hello, > > I have a question about list components. When I try to specify text > to appear in a List box, each character appears on a line alone and > nothing shows up in the stringSelection drop down box. I'm not an expert on Pythoncard, but given the description of the error, I would try passing the list of movie titles directly rather than a single string. E.g. instead of: # clips is a list of movie titles self.components.List1.items = str(clips) I would use this: self.components.List1.items = clips This assumes that each movie title is a string. Calling str() on a list of strings gives you a single string: py> clips = ['Warm Bodies', 'Gone With The Wind', 'Alien'] py> str(clips) "['Warm Bodies', 'Gone With The Wind', 'Alien']" and then iterating over that string gives you individual characters, including those from the list itself: py> for element in str(clips): ... print element ... [ ' W a r m [... snip long output ...] Does this help? -- Steven |