Open GoogleCodeExporter opened 9 years ago
What CEF version? 31.1 is the latest. What wxPython version? Please paste the
whole wx version string that is displayed in the wxpython.py example in console
(see for example
http://cefpython.googlecode.com/git/cefpython/var/wxpython.png).
sample3.py works fine for me with wx 2.8. Looks like an issue with the
wxWidgets flatnotebook control in wx 3.0, the wx.WANTS_CHARS style is not
applied. Make sure that yu have this line in sample3.py:
self.tabs.SetWindowStyleFlag(wx.WANTS_CHARS)
Original comment by czarek.t...@gmail.com
on 15 Dec 2014 at 7:40
[deleted comment]
See also Issue 80 that explains in details the need for the wx.WANTS_CHARS
style for the keyboard to work.
Original comment by czarek.t...@gmail.com
on 15 Dec 2014 at 7:44
the wx version string is "VERSION_STRING = '3.0.1.1'"
the cefpython verison is "__version__ = "31.0"
I am sure following code exists in sample.py
self.tabs.SetWindowStyleFlag(wx.WANTS_CHARS)
I will try 31.1 later
Original comment by Zhouji...@gmail.com
on 16 Dec 2014 at 5:19
I can confirm this issue. Tested with cefpython3 31.2 for Python 2.7 64bit and
wx.version=3.0.2.0 msw (classic). The issue occurs in both sample2.py and
sample3.py. The sample1.py is running fine, because it embeds cef browser in
main frame and there is no need to use the wx.WANTS_CHARS for main frame.
This issue should be reported to wxWidgets/wxPython
(http://trac.wxwidgets.org/).
I haven't tested it yet on other platforms, but I think this is a Windows only
issue.
In the meantime you can fix it by propagating the Char event manually to child
windows. This can be done either with a global hook to wx.EVT_CHAR. Or if that
doesn't work try wx.EVT_CHAR_HOOK. EVT_CHAR_HOOK is a Windows only event I
think, kind of a hack for Windows issues with Char events. For more details on
wx.EVT_CHAR_HOOK see: http://docs.wxwidgets.org/3.0/classwx_key_event.html .
Original comment by czarek.t...@gmail.com
on 20 Jan 2015 at 5:46
[deleted comment]
@comment #5: The fix to propagate Char events to child windows - may require
using Windows API (pywin32 extension) to send Char events to CEF browser child
windows. You can get native window handle (HWND) by calling
browser.GetWindowHandle(). To send the Char event using pywin32 use this code:
c = "a"
win32api.SendMessage(hwnd, win32con.WM_CHAR, ord(c), 0)
To get browser object using chromectrl API use these methods:
ChromeWindow.GetBrowser()
ChromeCtrl.chromeWindow.GetBrowser()
Original comment by czarek.t...@gmail.com
on 20 Jan 2015 at 6:04
Original issue reported on code.google.com by
Zhouji...@gmail.com
on 15 Dec 2014 at 1:28