wxchoice appenitems not working

When I try to “append” the rows returned to the widget only places one row , the last row … when i try to “append items” to the widget only one row is shown but it is shown as a column … what am I doing wrong ???

self.weather2 = wx.Choice(self.panel, wx.ID_ANY, choices = self.nameofevet1, name='ShowList')

self.populateVenue(self)
def populateVenue(self,event):
conn = lite.connect(“C:\Python26\sign1\VenueShow\PermPatRecord.sqlite”)
c = conn.cursor()
c.execute(‘select * from showlist’)
rows=c.fetchall()
rRows=[]
for row in rows:
s={}
s[‘Venue_name’] =row[1] self.nameofevet1 = s[‘Venue_name’]
print self.nameofevet1
self.weather2.Clear()
self.weather2.AppendItems(self.nameofevet1)

Clay Richmond wrote:

When I try to "append" the rows returned to the widget only places one
row , the last row ... when i try to "append items" to the widget only
one row is shown but it is shown as a column ... what am I doing wrong ???

It looks like you are overwriting s['Venue_name'] with a single item each time through the loop, instead of appending the items to a list. So when you get to AppendItems you only have one.

···

--
Robin Dunn
Software Craftsman