(self)
| 83 | tk.Button(keywordoption, text="删除关键字", command=self.delete_keyword).grid(column=1, row=1, padx=30, pady=5) |
| 84 | |
| 85 | def user(self): # 用户信息 |
| 86 | User = tk.LabelFrame(self.window, text="微博用户", padx=10, pady=5) # 水平,垂直方向上的边距均为 10 |
| 87 | User.place(x=1070, y=100) |
| 88 | self.userListBox = Listbox(User, width=35, height=9, ) |
| 89 | self.userListBox.pack(side=LEFT) |
| 90 | userScroBar = Scrollbar(User) |
| 91 | userScroBar.pack(side=RIGHT, fill=Y) |
| 92 | |
| 93 | self.userListBox['yscrollcommand'] = userScroBar.set |
| 94 | userinfos = userinfodb.select({}) |
| 95 | |
| 96 | for user in userinfos: |
| 97 | username = user.get('username') |
| 98 | pwd = user.get('password') |
| 99 | self.userListBox.insert(END, '账号:{} 密码:{};'.format(username, pwd)) |
| 100 | |
| 101 | userScroBar['command'] = self.userListBox.yview |
| 102 | # userScrotext = scrolledtext.ScrolledText(User, width=30, height=6, padx=10, pady=10, wrap=tk.WORD) |
| 103 | # userScrotext.grid(columnspan=2, pady=10) |
| 104 | Useroption = tk.LabelFrame(self.window, text="", padx=10, pady=5) # 水平,垂直方向上的边距均为 10 |
| 105 | Useroption.place(x=1070, y=300) |
| 106 | tk.Button(Useroption, text="添加账号", command=self.add_user).grid(column=0, row=1, padx=35, pady=5) |
| 107 | tk.Button(Useroption, text="删除账号", command=self.delete_use).grid(column=1, row=1, padx=35, pady=5) |
| 108 | |
| 109 | def config(self): # 配置 |
| 110 | Config = tk.LabelFrame(self.window, text="配置", padx=10, pady=5) # 水平,垂直方向上的边距均为 10 |
no test coverage detected