Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何改进用python创建的窗口的外观?_Python_User Interface_Tkinter_Raspberry Pi_Lcd - Fatal编程技术网

如何改进用python创建的窗口的外观?

如何改进用python创建的窗口的外观?,python,user-interface,tkinter,raspberry-pi,lcd,Python,User Interface,Tkinter,Raspberry Pi,Lcd,我想创建一个看起来不像windows xp中的窗口的窗口 我想要一个顶部没有横杆的普通盒子。这可能吗 我想做一个图形用户界面,但我想要一个全屏幕固定显示。顺便说一句,我正在使用或想使用tkinter。如果您的toplevel命名为toplevel,您可以使用wm\u属性使其全屏显示: toplevel.wm_attributes('-fullscreen', '1') 或者你可以: root.state('zoomed') 这将显示为一个全屏应用程序。您可以导入ttk,在tkinter中使用

我想创建一个看起来不像windows xp中的窗口的窗口

我想要一个顶部没有横杆的普通盒子。这可能吗


我想做一个图形用户界面,但我想要一个全屏幕固定显示。顺便说一句,我正在使用或想使用tkinter。

如果您的toplevel命名为
toplevel
,您可以使用
wm\u属性使其全屏显示:

toplevel.wm_attributes('-fullscreen', '1')
或者你可以:

root.state('zoomed')

这将显示为一个全屏应用程序。

您可以导入ttk,在tkinter中使用不同的样式,并创建自己的自定义主题,但除此之外,除非您使用不同的模块 (注意ttk是一个股票python模块)

比如说

import tkinter
from tkinter import ttk

mycolour = "color code here"
mybackground = "color code here"

style = ttk.Style()

style.theme_create( "custom_theme", parent="alt", settings={
    "TNotebook": {"configure": {"tabmargins": [2, 5, 2, 0] } },
    "TNotebook.Tab": {
        "configure": {"padding": [5, 1], "background": mycolour },
        "map":       {"background": [("selected", mybackground)],
                      "expand": [("selected", [1, 1, 1, 0])] } } } )


style.theme_use("custom_theme")