6

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 });

2 Answers 2

14

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

0

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()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.