If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
I'm working on a WYSIWYG (https://en.wikipedia.org/wiki/WYSIWYG) project, I'm trying to show the result immediately after any change happened to wxTextCtrl, the problem is when I update the wxWebView by SetPage(), cursor focus set automatically to the wxWebView, so user need to click again on wxTextCtrl to make new change!
If wxWebView is the only thing that eats the focus then all you need is catch the focus received event for wxWebview object, swnd it back to wxStc same as you do now and skip the event. That way, every time wxWV receives a focus it focuses wxStc
Chief Justice: We have trouble dear citizens! Citizens: What it is his honor? Chief Justice:Our president is an atheist, who will he swear to?
saifcoder wrote: ↑Sun Nov 17, 2019 8:11 pm
Yes, but I didn't find focus event for the wxWebview in the documentation! is there one?
wxWebView inherits from wxControl which in turn inherits from wxWindow (shown in docs inheritance tree). So you have wxEVT_SET_FOCUS. See documentation at https://docs.wxwidgets.org/3.0/classwx_window.html
Chief Justice: We have trouble dear citizens! Citizens: What it is his honor? Chief Justice:Our president is an atheist, who will he swear to?