本文整理汇总了Python中tkinter.Entry.textvariable方法的典型用法代码示例。如果您正苦于以下问题:Python Entry.textvariable方法的具体用法?Python Entry.textvariable怎么用?Python Entry.textvariable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tkinter.Entry
的用法示例。
在下文中一共展示了Entry.textvariable方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Tk
# 需要导入模块: from tkinter import Entry [as 别名]
# 或者: from tkinter.Entry import textvariable [as 别名]
import tkinter.filedialog as filedialog
from pngPacker import trimList, getstatus, resetStatus, writeFile, analyse
from tkinter.constants import RIGHT
__version__ = "0.0.3"
root = Tk()
# root.geometry("385x150")
root.title("pngPacker --- version %s" % __version__)
top = Frame(root, width = 390, height = 90)
advancedFrame = Frame(root, width = 390, height = 90)
filePathLabel = Label(top, text = "", width = 30)
outDictoryLabel = Label(top, text = "", width = 30)
outNameEntry = Entry(advancedFrame)
outNameEntry.textvariable = "image_"
limitXEntry = Entry(advancedFrame, width = 2)
limitYEntry = Entry(advancedFrame, width = 2)
pngPath = ""
outDictory = ""
name = "image_"
# global rectlist
rectlist = []
def getfilepath():
filepath = filedialog.askopenfilename()
if filepath:
global pngPath
pngPath = os.path.abspath(filepath)