bind return key to search

This commit is contained in:
zenyd 2017-09-24 16:30:31 +02:00
parent 4f271f1892
commit 97d5a122a2
1 changed files with 4 additions and 0 deletions

View File

@ -11,6 +11,7 @@ class subselect :
frame = self.root
frame.title("Subtitle Downloader")
self.video_title_in = Entry(frame, width=100)
self.video_title_in.bind("<Return>", self.search_)
self.video_title_in.insert(0, videotitle)
self.video_title_in.grid(row=0, column=0)
self.search_button = Button(frame, text="Search", command=self.search)
@ -44,6 +45,9 @@ class subselect :
video_title = video_title[0]
return Video.fromname(video_title)
def search_(self, *args):
self.search()
def search(self) :
try :
self.video = self.get_video_from_title()