| 18 | self.show_keys(select_id=self.lists) |
| 19 | |
| 20 | def widgets(self): |
| 21 | self.lists = tk.Listbox(bg='#83FCE3',border=1,width=8,height=12,yscrollcommand=self.scrollbar.set) |
| 22 | for n,line in enumerate(self.keyslist): |
| 23 | self.lists.insert(n,line) |
| 24 | self.lists.bind("<<ListboxSelect>>",self.show_keys) |
| 25 | self.scrollbar.config(command = self.lists.yview) |
| 26 | |
| 27 | self.canvas = tk.Canvas(bg='#83FCE3',border=1,width=190,height=190,relief='groove') |
| 28 | |
| 29 | self.quit_btn = tk.Button(cursor='target',bg="#C2FCEE",text='quit',command=self.quit) |
| 30 | |
| 31 | # create a frame to align with the canvas widget |
| 32 | self.frame = tk.Frame(bg="#C2FCEE",width=180,height=180) |
| 33 | |
| 34 | self.btn1 = tk.Button(self.frame,cursor='target',bg="#C2FCEE",text='Pinyin',command=self.show_pinyin) |
| 35 | self.btn2 = tk.Button(self.frame,cursor='target',bg="#C2FCEE",text='Role',command=self.show_role) |
| 36 | self.btn3 = tk.Button(self.frame,cursor='target',bg="#C2FCEE",text='Definition',command=self.show_definition) |
| 37 | |
| 38 | self.label1 = tk.Label(self.frame,bg="#C2FCEE",text='',font=('Roboto','15')) |
| 39 | self.label2 = tk.Label(self.frame,bg="#C2FCEE",text='',font=('Roboto','15')) |
| 40 | self.label3 = tk.Label(self.frame,bg="#C2FCEE",text='',font=('Roboto','15')) |
| 41 | |
| 42 | def layouts(self): |
| 43 | |