Widget.childFocus

Called by widgets as the user moves around the window using keyboard shortcuts.

The direction argument indicates what kind of motion is taking place (up, down, left, right, tab forward, tab backward).

This function calls the vfuncGtk.Widget.focus virtual function; widgets can override the virtual function in order to implement appropriate focus behavior.

The default focus() virtual function for a widget should return TRUE if moving in direction left the focus on a focusable location inside that widget, and FALSE if moving in direction moved the focus outside the widget. When returning TRUE, widgets normally call gtk.widget.Widget.grabFocus to place the focus accordingly; when returning FALSE, they don’t modify the current focus location.

This function is used by custom widget implementations; if you're writing an app, you’d use gtk.widget.Widget.grabFocus to move the focus to a particular widget.

class Widget
bool
childFocus

Parameters

direction gtk.types.DirectionType

direction of focus movement

Return Value

Type: bool

true if focus ended up inside widget