Search code examples
javascriptpythoneel

EEL full screen GUI


I'm trying to make a small application using the eel module. What I ask you is: is there a way to have a full screen gui? Here the image for what I want:

This is what I have: enter image description here

This is what I want to have: enter image description here

So just without the grey line.

My python code:

import eel
from openpyxl import Workbook

wb = Workbook()
ws = wb.active
ws['A1'] = 'NOME1'
ws['B1'] = 'NOME2'

eel.init('web')
counter = 2
counter2 = 2
@eel.expose
def data1(data):
    global counter
    ws['A'+str(counter)] = data
    wb.save("sample.xlsx")
    counter += 1

@eel.expose
def data2(data):
    global counter2
    ws['B'+str(counter2)] = data
    wb.save("sample.xlsx")
    counter2 += 1


eel.start('index.html')

My javascript code:

function data1() {
    var data1 = document.getElementById("input1").value
    eel.data1(data1)
    document.getElementById('input1').value = ''

}

function data2() {
    var data2 = document.getElementById("input2").value
    eel.data2(data2)
    document.getElementById('input2').value = ''
}

Solution

  • What I ask you is: is there a way to have a full screen gui?

    Yes, that's possible, but requires an explanation...

    First, it's important to understand that internally Eel is opening a browser application to render your HTML and execute your JavaScript. Which browser it uses will depend on the mode argument to the eel.start function; it defaults to 'chrome' as explained in the documentation (see Eel documentation).

    This means that the browser application being used must support full-screen operation... if it doesn't, Eel is not going to be able help.

    Chrome, for example, does allow full-screen mode... they call it "kiosk" mode. To enable it, you should pass in additional cmdline_args to the eel.start function... something like this:

    eel.start('index.html', mode='chrome', cmdline_args=['--kiosk'])
    

    One additional implementation note to be aware of... in Chrome, the kiosk mode will only be applied after all Chrome windows are closed (again, this is an implementation detail outside the scope of Eel framework). The best way to force this is to close down Chrome application completely, and then run your Eel application with the eel.start as described above.

    The point is... you need to research how to enable full-screen for whatever underlying browser application Eel is using.