电子更改框架从远程打开/关闭 [英] Electron change frame on/off from remote
问题描述
有人可以告诉我是否可以使用遥控器切换BrowserWindow对象的frame属性吗?
Can someone tell me if it's possible to toggle frame property of BrowserWindow object using remote ?
我试图将此属性添加到remote.getCurrentWindow()。setBounds,但这不起作用。
I have tried to add this property to remote.getCurrentWindow().setBounds but that doesn't work.
谢谢
推荐答案
您不能那样做。
这里是拒绝了以下功能请求: github.com/electron/electron/issues/1145
Here's the rejected feature request for this: github.com/electron/electron/issues/1145
zcbenz的报价
即时删除窗口框会增加太多代码的复杂性
,而且实现起来并不容易。我认为
不值得付出努力,尽管在某些罕见情况下它很有用。
Enabling removing window frame on the fly will add too much complexity to the code, and it is not easy to implement. I don't think it deserves the efforts, even though it is useful in some rare cases.
这段时间的事情
正如问题中提到的,您可以通过破坏当前窗口来解决此问题,并在合适的情况下创建具有不同frame属性的相同对象为您
这篇关于电子更改框架从远程打开/关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!