def METHOD_NAME(self, event):  # wxGlade: MyFrame.<event_handler>
    # This code should load just specific project files rather than all importable formats.
    files = self.context.elements.load_types()
    with wx.FileDialog(
        self, _("Open"), wildcard=files, style=wx.FD_OPEN | wx.FD_FILE_MUST_EXIST
    ) as fileDialog:
        if fileDialog.ShowModal() == wx.ID_CANCEL:
            return  # the user changed their mind
        pathname = fileDialog.GetPath()
        self.clear_project()
        self.load(pathname)
    event.Skip()