Reputation: 661
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 });
Upvotes: 6
Views: 13172
Reputation: 2147
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()
Upvotes: 0
Reputation: 767
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
Upvotes: 14