robertlugg / easygui

easygui for Python
http://easygui.readthedocs.org/en/master/
BSD 3-Clause "New" or "Revised" License
451 stars 114 forks source link

Importing pywinauto changes the fileopenbox UI #200

Open breadcat-rr opened 2 years ago

breadcat-rr commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

zadacka commented 2 years ago

Hmm, what versions of easygui and pywinauto, and and which Windows OS are you using? I’ll have another shot at reproducing it..

On Sun, 24 Apr 2022 at 05:27, Breadcat @.***> wrote:

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

— Reply to this email directly, view it on GitHub https://github.com/robertlugg/easygui/issues/200#issuecomment-1107707045, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2XZIMT6KWDNLETYB2GSGLVGTESRANCNFSM5TQQTCLQ . You are receiving this because you commented.Message ID: @.***>

breadcat-rr commented 2 years ago

easygui: Version: 0.98.2

pywinauto Version: 0.6.8

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

zadacka commented 2 years ago

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 commented 2 years ago

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

hrpzcf commented 1 year ago

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 commented 1 year ago

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