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

Importing pywinauto changes the fileopenbox UI #200

Open
breadcat-rr opened this issue Apr 15, 2022 · 8 comments
Open

Importing pywinauto changes the fileopenbox UI #200

breadcat-rr opened this issue Apr 15, 2022 · 8 comments

Comments

@breadcat-rr
Copy link

breadcat-rr commented Apr 15, 2022

When importing pywinauto it makes the fileopenbox (and probably others, untested) a less usable and worse UI.
e.g

import pywinauto
import easygui
easygui.fileopenbox()

Expected UI.
Expected UI

The UI that is actually presented.
pywinauto hijacked UI

@zadacka
Copy link
Collaborator

zadacka commented Apr 23, 2022

Strange - I can't reproduce this. Did something else change in between the before/after screenshots? If you comment out the pywinauto import do you still see the unexpected (light) dialog?

@breadcat-rr
Copy link
Author

For me at least, when I comment out pywinauto it shows back to the expected UI

@zadacka
Copy link
Collaborator

zadacka commented Apr 24, 2022 via email

@breadcat-rr
Copy link
Author

easygui:
Version: 0.98.2

pywinauto
Version: 0.6.8

OS: Windows 10 Pro
Version: 20H2
OS Build: 19042.1348

@zadacka
Copy link
Collaborator

zadacka commented Apr 26, 2022

Nope, my initial hypothesis seems totally wrong.

What is your tkinter version? Has it changed since installing and using pywinauto (or other dependencies)?

My default theme is 'light' (maybe using an older version of tk), and I haven't been able to find where it is set or default. I don't think that it is explicitly changed anywhere in easygui

@breadcat-rr
Copy link
Author

I'm using tkinter version 8.6. I don't think its changed at all because I never update my packages lol

@hrpzcf
Copy link
Contributor

hrpzcf commented Sep 22, 2022

Maybe it's a bug of pywinauto, edit pywinauto/__init__.py line 83, change return com_init_mode to return 2, it should work.

@breadcat-rr
Copy link
Author

Yep, that works, Thanks!. Also found out that easygui.diropenbox() just hangs if pywinauto is unchanged.

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

No branches or pull requests

3 participants