Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Window can be resized horizontally, leaving blank space on one side #14

Open
sfreemire opened this issue Nov 22, 2023 · 5 comments
Open
Labels
enhancement New feature or request

Comments

@sfreemire
Copy link
Owner

sfreemire commented Nov 22, 2023

To resolve Bug "Application Window is too tall for small monitors #13" app window resizing was enabled. This was needed for vertical size adjustment, but horizontal adjustments are not necessary. Adjusting horizontally just creates blank space to the right of all of the calculator sections.

PySimpleGUI github issues page shows this was fixed. The solution is to use window.set_resizable(False,True). It was supposedly added in PSG 4.60.0.9. I'm currently running 4.60.4 and it isn't working. I'm opening an issue with PSG on github to address this.

@sfreemire
Copy link
Owner Author

sfreemire commented Nov 22, 2023

I opened an issue with PSG and was instructed to install the latest PSG version from github instead of pypi. The version information in the previously referenced PSG github issue #5502 was wrong. The needed feature won't appear until PSG v5 is released.
In my appsize branch I'm using PSG v4.61.0.205 and window.set_resizable(False, True) is now working. You can resize vertically, but not horizontally.

@sfreemire sfreemire reopened this Nov 22, 2023
@sfreemire sfreemire added the enhancement New feature or request label Nov 22, 2023
@sfreemire
Copy link
Owner Author

sfreemire commented Nov 22, 2023

I'm not pushing the code with window.set_resizable(False, True) to the main branch. I don't want users to have to download PySimpleGUI from github instead of getting it with pip install PySimpleGUI.

When PSG 5 is released and available on pypi, this feature should be enabled.

At that time it should be added to the IP_MAP_Calculator code. It goes directly after the window = sg.Window() command.

@sfreemire
Copy link
Owner Author

sfreemire commented Nov 28, 2023

Actually, I did push the code to the main branch and updated to v0.8.0. I simply commented out the one statement that will not work in PSG v4.x. That way, I could add the window scrolling and resizing for small displays. The horizontal resizing remains enabled, but it doesn't affect functionality. When PSG v5 is released on pypi, we just have to uncomment window.set_resizable(False, True). That will disable horizontal resizing of the main window.
(False, True) = (horizontal, vertical)

@sfreemire
Copy link
Owner Author

PSG v5 has a new NON-OPEN-SOURCE license. Need to decide whether to move to their free private-use license, or dump PSG.

@sfreemire
Copy link
Owner Author

A fork of PySimpleGUI has been released called FreeSimpleGUI. Check whether it is compatible with this app and also has this feature.

Note: FreeSimpleGUI is also mentioned in Issue #7, Additional Features list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant