Load dialog from XRC file

Greetings to the list,

I have trying to load dialog from XRC file. and the dialog shows. but the problem is that functions of buttons do not work well.

Can some one give me some idea? Thanks. Below is part of the structure of the code.

Carolyn

class MyFrame(wxFrame):
    def __init__(self,parent,id, TITLE):
        wxFrame.__init__(self, parent, -1, TITLE , wxDefaultPosition, wxSize(800, 600),
                         wxDEFAULT_FRAME_STYLE|wxNO_FULL_REPAINT_ON_RESIZE|wxWANTS_CHARS)

        resource_file = "dec2.xrc"
        self.res = wxXmlResource(resource_file)
        self.dialog = self.res.LoadDialog(self,"dialog_1")

        self.VariablesCtrl = XRCCTRL(self.dialog,"list_box_3")
        self.IndependCtrl = XRCCTRL(self.dialog,"list_box_1")

        self.Bind(wx.EVT_LISTBOX, self.GetSelected, self.VariablesCtrl)
        self.Bind(wx.EVT_LISTBOX, self.GetXSelected, self.IndependCtrl)

    def GetSelected(self, event):
        """ Selections in Variables """
        print "It's GetSelected"
        if len(self.DependCtrl.GetStrings()) == 0:
            self.butAddSelY.Enable(True)

            self.butAddSelX.Enable(False)
            self.butAddAll.Enable(False)

        else:
            self.butAddSelY.Enable(False)

            self.butAddSelX.Enable(True)
            self.butAddAll.Enable(True)

        self.VarSelected = event.GetString()
        print "self.VarSelected:", self.VarSelected
        self.VarSelected_Index = event.GetSelection()

    def GetXSelected(self, event):
        print "GetXSelected:", GetXSelected
        self.butReturnSel.Enable(True)
        self.butReturnAll.Enable(True)
        self.XSelected = event.GetString()
        self.XSelected_Index = event.GetSelection()