简体   繁体   English

如何停止调整大小或锁定 window 大小或冻结 eel python 库中的 window 大小

[英]How can I stop resizing or lock the window size or freeze the window size in eel python library

coders编码员

Currently, I am working on a Python project where I have to make a desktop application using the python EEL library and I have done half of the project.目前,我正在开发一个 Python 项目,我必须使用 python EEL 库制作一个桌面应用程序,并且我已经完成了一半的项目。

Recently I found out that I need to freeze my window size.最近我发现我需要冻结我的 window 大小。 So is there any option or trick so I can freeze my window size or in javascript to stop the user from resizing my window?那么有什么选项或技巧可以让我冻结我的 window 大小或 javascript 以阻止用户调整我的 window 的大小吗?

What argument could be added to these options?这些选项可以添加什么论据?

import eel
    app_options = {
        'mode': "chrome",
        'host': "localhost",
        'port': 0
    } #'mode' as 'chrome-app' also has same issue
    eel.init('web')
    eel.start('main.html', size=(600,600), options=app_options)

Any type of help is appreciated.任何类型的帮助表示赞赏。

eel is a gate through python and javascript in the browser. eel是浏览器中通过 python 和 javascript 的门。 since javascript can not prevent the user from controlling browser window size, so you can not do that by eel .由于 javascript 不能阻止用户控制浏览器 window 的大小,所以你不能通过eel来做到这一点。

and I think the following link may help you to go around https://stackoverflow.com/a/55943053/8286874我认为以下链接可能会帮助您了解 go 周围的https://stackoverflow.com/a/55943053/8286874

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM