views:

246

answers:

1

This is my combo box code:

self.lblname = wx.StaticText(self, -1,"Timeslot"  ,wx.Point(20,150))
self.sampleList = ['09.00-10.00','10.00-11.00','11.00-12.00'] 
self.edithear=wx.ComboBox(self, 30, "", wx.Point(150,150 ), wx.Size(95, -1),
self.sampleList, wx.CB_DROPDOWN)

and this is my command button code:

def OnClick(self,event):
    self.logger.AppendText("  %d\n" %event.GetId())

I need to send the contents of the combo box to a flat file after clicking the command button. How should I link them?

A: 

If the Onclick method is in the same class you can reach your combo via self.edithear

Blauohr