这是我第一次试图这样做,我没有能够就我的目标如何实现进行辩驳、聊天会或酒吧、正确的录像或辅导。
I know I need to save the information in the text box from line 26-27 ((textbox = tk.Text(root, height=7, width= 50, font=( Arial , 16)) textbox.pack()))
I believe after that I can use wks.update( A2, (not sure what would go here either))
然而,在概览表一中,我不知道如何使下一个条目落到A3线,然后是A4。
我知道下一个盒子说,“你所尝试的是什么,你所期望的是什么”,我也找不到任何起点,甚至可以开始,这样会受到赞赏,而且 sp子下面就是这样。
事先感谢你
import tkinter as tk
from tkinter import *
from tkinter import ttk
import gspread
root = tk.Tk()
#Authentication
sa = gspread.service_account()
#Defining workspace
sh = sa.open("ClientList")
wks = sh.worksheet("Cold Information")
print (wks.get( D2:F2 ))
wks.update( A2 , text )
#GUI Frame
root.geometry("800x500")
root.title ("Client Infromation Entry System (CIES)")
root.resizable(False, False)
#Text Box Label
label = tk.Label(root, text="Client Infromation", font=( Arial , 20))
label.pack(padx=20, pady=20)
#Text box
textbox = tk.Text(root, height=7, width= 50, font=( Arial , 16))
textbox.pack()
#Text grabber
def save():
text = textbox.get( 1.0 , END)
#Text Clearer
def clear():
textbox.delete( 1.0 , END)
#Button Frame Work
buttonframe = tk.Frame(root)
buttonframe.pack()
buttonframe.columnconfigure(0, weight=1)
buttonframe.columnconfigure(2, weight=1)
buttonframe.columnconfigure(3, weight=1)
Savebtn = tk.Button(buttonframe, text="Save Client Infromation", font=( Arial , 16), command=save)
Savebtn.grid(row=0, column=0, sticky=tk.W+tk.E)
Clearbtn = tk.Button(buttonframe, text="Clear Client Infromation", font=( Arial , 16), command=clear)
Clearbtn.grid(row=0, column=1, sticky=tk.W+tk.E)
Quitbtn = tk.Button(buttonframe, text="Quit", width=11, font=( Arial , 16), command=quit)
Quitbtn.grid(row=0, column=2, sticky=tk.W+tk.E,)
#Loop
root.mainloop()