English 中文(简体)
我的目标是使用一个文字箱,并节省纽伦,将文字箱信息输入 go图。
原标题:My goal is to use a text box and save button to import the text box information into google sheets
  • 时间:2023-06-03 02:34:29
  •  标签:
  • python

这是我第一次试图这样做,我没有能够就我的目标如何实现进行辩驳、聊天会或酒吧、正确的录像或辅导。

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()
问题回答

暂无回答




相关问题
Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

An enterprise scheduler for python (like quartz)

I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...

How to remove unique, then duplicate dictionaries in a list?

Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...

What is suggested seed value to use with random.seed()?

Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...

How can I make the PyDev editor selectively ignore errors?

I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

Converting Dictionary to List? [duplicate]

I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...

热门标签