MCPcopy
hub / github.com/lxn/walk / SetFocus

Method SetFocus

window.go:1958–1964  ·  view source on GitHub ↗

SetFocus sets the keyboard input focus to the *WindowBase.

()

Source from the content-addressed store, hash-verified

1956
1957// SetFocus sets the keyboard input focus to the *WindowBase.
1958func (wb *WindowBase) SetFocus() error {
1959 if win.SetFocus(wb.hWnd) == 0 {
1960 return lastError("SetFocus")
1961 }
1962
1963 return nil
1964}
1965
1966// FocusedChanged returns an Event that you can attach to for handling focus
1967// change events for the WindowBase.

Callers

nothing calls this directly

Calls 2

lastErrorFunction · 0.85
SetFocusMethod · 0.65

Tested by

no test coverage detected