MCPcopy Create free account
hub / github.com/cztomczak/cefpython / FocusHandler

Class FocusHandler

examples/tkinter_.py:285–306  ·  view source on GitHub ↗

For focus problems see Issue #255 and Issue #535.

Source from the content-addressed store, hash-verified

283
284
285class FocusHandler(object):
286 """For focus problems see Issue #255 and Issue #535. """
287
288 def __init__(self, browser_frame):
289 self.browser_frame = browser_frame
290
291 def OnTakeFocus(self, next_component, **_):
292 logger.debug("FocusHandler.OnTakeFocus, next={next}"
293 .format(next=next_component))
294
295 def OnSetFocus(self, source, **_):
296 logger.debug("FocusHandler.OnSetFocus, source={source}"
297 .format(source=source))
298 if LINUX:
299 return False
300 else:
301 return True
302
303 def OnGotFocus(self, **_):
304 logger.debug("FocusHandler.OnGotFocus")
305 if LINUX:
306 self.browser_frame.focus_set()
307
308
309class NavigationBar(tk.Frame):

Callers 1

embed_browserMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected