def DismissListBox(self): if self.listbox is not None: if self.listbox.ListBox.HasCapture(): self.listbox.ListBox.ReleaseMouse() self.listbox.Destroy() self.listbox = None