from wxPython.wx import *
class Preq_form(wxPanel):
    def __init__(self, parent, id):
        wxPanel.__init__(self, parent, id)
        customer_id = 5675768556
        text = "Customer ID: %10d" % customer_id
        self.quote = wxStaticText(self, -1, text,wxPoint(20, 30))


        # Enter Data
        wxEdit1ID = wxNewId()
        self.lblname1 = wxStaticText(self, -1, "First name:", wxPoint(20,60))
        self.edit1 = wxTextCtrl(self, wxEdit1ID, "", wxPoint(170, 60), wxSize(140,-1))
        EVT_TEXT(self, wxEdit1ID, self.EvtText)

        wxEdit2ID = wxNewId()
        self.lblname2 = wxStaticText(self, -1, "Last name :", wxPoint(20,90))
        self.edit2 = wxTextCtrl(self, wxEdit2ID, "", wxPoint(170, 90), wxSize(140,-1))
        EVT_TEXT(self, wxEdit2ID, self.EvtText)

        sampleList = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine','ten']

        wxChoiceID = wxNewId()
        self.lblname3 = wxStaticText(self, -1, "Years :", wxPoint(20, 150))
        self.choice = wxChoice(self, wxChoiceID, (170, 150), choices = sampleList)
        EVT_CHOICE(self, wxChoiceID, self.EvtChoice)


    def EvtText(self, event):
        obj = event.GetEventObject()
        objID = event.GetId()
        print 'edit: %s\n' % obj.GetValue()
        print 'edit id: %s\n' % objID

    def EvtChoice(self, event):
        obj = event.GetEventObject()
        sel = obj.GetSelection()
        if not sel == -1:
            print 'EvtCoice text: %s\n' % obj.GetString(sel)
            print 'EvtCoice: %d\n' % sel

app = wxPySimpleApp()
frame = wxFrame(None, -1, " Enter Data")
Preq_form(frame,-1)
frame.Show(1)
app.MainLoop()
