Web 搜索历史的 GUI
GUI for web search history
我绝对是 python 的新手。我正在构建一个网络历史记录跟踪器,用于跟踪用户的网络历史记录和访问时间。我想创建一个带有按钮的 GUI 并在用户单击后显示用户的历史记录输出。如果有救命恩人可以帮助我解决这个问题,将不胜感激。非常感谢你
这是我用来启动我的 GUI 应用程序的最基本的 GUI 框架。这样我就不用每次都记住初始设置了。
import tkinter as tk
class OOP:
def __init__(self):
self.win = tk.Tk()
self.win.title("My Title")
self.create_widgets()
def click_me(self): # this is how you set up functions to run on button clicks
print("button was clicked")
def create_widgets(self):
tk.Label(self.win, text="My GUI").pack(expand=1, fill='both')
tk.Button(self.win, text="Click ME", command=self.click_me).pack(expand=1, fill='both')
app = OOP()
app.win.mainloop()
您可以在网上查找有关如何填写的信息。不过,我使用 http://effbot.org/tkinterbook/ 作为主要参考点。如果您需要更多帮助,您将不得不 post 一个需要解决的实际问题
我绝对是 python 的新手。我正在构建一个网络历史记录跟踪器,用于跟踪用户的网络历史记录和访问时间。我想创建一个带有按钮的 GUI 并在用户单击后显示用户的历史记录输出。如果有救命恩人可以帮助我解决这个问题,将不胜感激。非常感谢你
这是我用来启动我的 GUI 应用程序的最基本的 GUI 框架。这样我就不用每次都记住初始设置了。
import tkinter as tk
class OOP:
def __init__(self):
self.win = tk.Tk()
self.win.title("My Title")
self.create_widgets()
def click_me(self): # this is how you set up functions to run on button clicks
print("button was clicked")
def create_widgets(self):
tk.Label(self.win, text="My GUI").pack(expand=1, fill='both')
tk.Button(self.win, text="Click ME", command=self.click_me).pack(expand=1, fill='both')
app = OOP()
app.win.mainloop()
您可以在网上查找有关如何填写的信息。不过,我使用 http://effbot.org/tkinterbook/ 作为主要参考点。如果您需要更多帮助,您将不得不 post 一个需要解决的实际问题