Custom Dialog Messagebox


I’m having trouble with a custom Dialog Message-box in Electron and wondering if someone else has resolved.

I have a msgbox.html file that’s apart of my application that gets loaded in a child model browser window from my main.js. The html file is pretty bland nothing fancy just sets up the page with 2 divs and centered with attached css.

The browser windows function gets called from my main html file as below…

ipcRenderer.send(‘message-box’,[‘string message’,width,height,button-indicator]

Main creates the Window as follows…

ipcMain.on(‘message-box’, (event, arg) => {

msgBox = new BrowserWindow({
window properties etc



Here’s my problem… the update routine for the message box isn’t showing my dataArr contents. The window gets created properly and modal but message I’m sending to the dialog isn’t making it. I’ve tried different variations load add the contents within a ready-to-show event but it still doesn’t work.

Any suggestions definitely appreciated. The above code isn’t exact as I was attempting not to write a book here.

Thanks in advance.

Solved, I messed up with CSS padding in my html and I needed to put the call in a did-finish-load event from main. Works !