Tkinter:如何居中窗口标题 [英] Tkinter : How to center the window title

查看:277
本文介绍了Tkinter:如何居中窗口标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用tkinter创建一个项目,当我创建一个窗口时,我似乎无法使窗口标题居中(就像如今的大多数程序一样)。这是示例代码:

I am creating a project using tkinter and when I create a window, I couldn't seem to get the window title to center itself (Like most programs nowadays). Here's the example code:

from tkinter import *

root = Tk()
root.title("Window Title".center(110))# Doesn't seem to work

root.mainloop()

有没有办法使窗口标题居中?预先感谢

Is there a way to center the window title up ? Thanks in advance

推荐答案

您无能为力。除了指定文本之外,Tkinter无法控制窗口管理器或OS如何显示窗口标题。

There is nothing you can do. Tkinter has no control over how the window manager or OS displays the titles of windows other than to specify the text.

这篇关于Tkinter:如何居中窗口标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆