question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How can I stop user to resizing the eel window size? Or is there any way to lock the window size or freeze the window size?

See original GitHub issue

Currently, I am working on a Python project where I have to make a desktop application using the python EEL library and I have done half of the project.

Recently I found out that I need to freeze my window size. So is there any option or trick so I can freeze my window size or in javascript to stop the user from resizing my window?

What argument could be added to these options?

import eel
    app_options = {
        'mode': "chrome",
        'host': "localhost",
        'port': 0
    } #'mode' as 'chrome-app' also has same issue
    eel.init('web')
    eel.start('main.html', size=(600,600), options=app_options)

Any type of help is appreciated.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

4reactions
hi-Nobodycommented, Mar 26, 2021

Try this way working for me!! Adding the following code in main.html

<script>
  $(document).ready(function (){
      window.resizeTo(600, 600);
  });
</script>
3reactions
JeswinSunsicommented, Jan 21, 2021

@RapchikUmang31 This is a workaround that I’ve made. It’s quite hacky but gets the job done.

window.addEventListener("resize", function(){
window.resizeTo({xValue}, {yValue});
});

Add that to all your pages and it should work fine

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I stop user to resizing the eel window size ... - GitHub
How can I stop user to resizing the eel window size? Or is there any way to lock the window size or freeze...
Read more >
How can I stop resizing or lock the window size or freeze the ...
Recently I found out that I need to freeze my window size. So is there any option or trick so I can freeze...
Read more >
[Solved] How to restrict window resizing by user - CodeProject
How can i stop user from resizing window upto certain limit? I do want to allow user for resizing a window upto some...
Read more >
Turn Off Automatic Window Resizing Windows 7 - YouTube
Dragging a window to one edge of the screen it would "dock" there and it will re- size to fill half the screen...
Read more >
Prevent Users Resizing the window form size at Runtime.
0:00 · New! Watch ads now so you can enjoy fewer interruptions. Got it.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found