def OnOK(self):
        self.UpdateData(1)
        for id, name in [(101,'greppattern'), (102,'dirpattern'), (103,'filpattern')]:
            if not self[name]:
                self.GetDlgItem(id).SetFocus()