How to change the size of the BrowserWindow, not at startup, but on time work?
All the solutions that I found were about such:
var win = new BrowserWindow({ width: 800, height: 600, show: false });
How to change the size of the BrowserWindow, not at startup, but on time work?
All the solutions that I found were about such:
var win = new BrowserWindow({ width: 800, height: 600, show: false });
Do you mean after the BrowserWindow is created you want to change its size dynamically. You can use setSize
win.setSize(width, height[, animate])
Refer docs
Use the setSize method, you should also use .center
afterwards to prevent any unnecessary movement after the change
// width, height, animate (true or false)
win.setSize(300, 200, faldse)
win.center()
© 2022 - 2024 — McMap. All rights reserved.