Maximize, minimize and restore with cefpython embedded in Tkinter on Windows

293 views
Skip to first unread message

Dino

unread,
Aug 28, 2018, 9:45:13 PM8/28/18
to CEF Python
I am embedding cefpython in Tkinter on Windows (Python 3.6) but I am having problems getting the browser to resize correctly on maximize/minimize/restore events.  If I resize by dragging the frame border, the browser resizes correctly.  If I click on maximize, minimize or restore it does not. The same problem occurs when running examples/tkinter_.py.  With both a drag resize and a maximize,  on_mainframe_configure is invoked, which in turn calls WindowUtils.OnSize and NotifyMoveOrResizeStarted.  However, for a maximize event this does not seem to have any effect, even though width and height carry correct values.  Can anyone advise on how to address this issue (and perhaps fix the example also)?

Thanks

Czarek Tomczak

unread,
Aug 28, 2018, 11:59:20 PM8/28/18
to CEF Python
I guess this is caused by WindowUtils.OnSize. This func shouldn't be used. Reported here:
https://github.com/cztomczak/cefpython/issues/464

tkinter.py example fixed in this commit:
https://github.com/cztomczak/cefpython/commit/38bcf0cb74f57b25da2f8fd547ae35c7e167dbcb
Reply all
Reply to author
Forward
0 new messages