【问题标题】:Can you write images on tkinter root window?你可以在 tkinter 根窗口上写图像吗?
【发布时间】:2021-05-31 04:42:11
【问题描述】:

我想知道是否有办法在 tkinter 根窗口上打印文本,如果可能,请告诉我如何。

【问题讨论】:

  • 你试过this吗?
  • 你的标题是关于图片的,但你的问题是关于文字的?

标签: python tkinter


【解决方案1】:

如果“根窗口”是指 window = Tk():

from tkinter import *

window = Tk()

window.geometry("800x600")

# This line should give you a text line in the top-left of the window
Label(window,text = "Enter your text here").grid(row = 1, column = 1)

window.mainloop()

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-04-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-05-29
    • 1970-01-01
    相关资源
    最近更新 更多