Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Electron: How to resize the BrowserWindow?

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 });
like image 538
VINET Avatar asked Dec 24 '22 16:12

VINET


1 Answers

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

like image 176
devilpreet Avatar answered Dec 27 '22 20:12

devilpreet