Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/321.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 to.exe与pyinstaller不可重新调整大小的问题_Python - Fatal编程技术网

Python to.exe与pyinstaller不可重新调整大小的问题

Python to.exe与pyinstaller不可重新调整大小的问题,python,Python,我目前正在用python创建一个应用程序,并使用pyinstaller将python文件压缩为.exe文件。是否有一种方法或一行代码可以用来使.exe窗口不可重新调整大小?您可以在原始应用程序中尝试Tkinter的可调整大小的方法 from tkinter import Tk, mainloop, TOP from tkinter.ttk import Button # creating tkinter window root = Tk() # creating fixed

我目前正在用python创建一个应用程序,并使用pyinstaller将python文件压缩为.exe文件。是否有一种方法或一行代码可以用来使.exe窗口不可重新调整大小?

您可以在原始应用程序中尝试Tkinter的
可调整大小的方法

from tkinter import Tk, mainloop, TOP 
from tkinter.ttk import Button 
  
# creating tkinter window 
root = Tk() 
  
# creating fixed geometry of the 
# tkinter window with dimensions 150x200 
root.geometry('200x150') 

## fixed size
root.resizable(height=0, width=0)
  
button = Button(root, text = 'TEST') 
button.pack(side = TOP, pady = 5) 
  
mainloop() 

根目录中的零
高度
宽度
参数。可调整大小
仅表示其不可调整大小。

您可以在原始应用程序中尝试Tkinter的
可调整大小
方法

from tkinter import Tk, mainloop, TOP 
from tkinter.ttk import Button 
  
# creating tkinter window 
root = Tk() 
  
# creating fixed geometry of the 
# tkinter window with dimensions 150x200 
root.geometry('200x150') 

## fixed size
root.resizable(height=0, width=0)
  
button = Button(root, text = 'TEST') 
button.pack(side = TOP, pady = 5) 
  
mainloop() 

根目录中的零
高度
宽度
参数。可调整大小的
仅表示其不可调整大小。

这取决于用户界面使用的库。如何向用户显示数据?它是一个控制台,还是一个
tkinter
,或者其他一些图形库?它在控制台中显示为文本这取决于用户界面使用的库。如何向用户显示数据?它是一个控制台,还是一个
tkinter
,或者其他一些图形库?它在控制台中显示为文本。很遗憾,这不起作用,我将在tkinter中重新创建我的项目并使用此方法。谢谢你的帮助!不幸的是,这不起作用,我将在tkinter中重新创建我的项目并使用此方法。谢谢你的帮助!