// SetEnabled sets if the *WindowBase is enabled for user interaction. func (wb *WindowBase) SetEnabled(value bool) { wb.enabled = value win.EnableWindow(wb.hWnd, wb.window.Enabled()) wb.enabledChangedPublisher.Publish() }
func setDescendantsEnabled(window Window, enabled bool) { wb := window.AsWindowBase() wb.SetEnabled(enabled) walkDescendants(window, func(w Window) bool { if w.Handle() == wb.hWnd { return true } win.EnableWindow(w.Handle(), enabled && w.AsWindowBase().enabled) return true }) }