ctrlutil.go
func SendEventToChild(parent Control, ev Event) bool {
	var child Control
	if IsMouseClickEvent(ev) {
		child = ChildAt(parent, ev.X, ev.Y)
		if child != nil && !child.Active() {
			ActivateControl(parent, child)
		}
	} else {
		child = ActiveControl(parent)
	}

	if child != nil && child != parent {
		ev.Target = child
		res := child.ProcessEvent(ev)

		if cparent := ClippedParent(child); cparent != nil && cparent != child {
			cparent.ProcessEvent(ev)
		}

		return res
	}

	return false
}
func SendEventToChild(parent Control, ev Event) bool {
	var child Control
	if IsMouseClickEvent(ev) {
		child = ChildAt(parent, ev.X, ev.Y)
		if child != nil && !child.Active() {
			ActivateControl(parent, child)
		}
	} else {
		child = ActiveControl(parent)
	}

	if child != nil && child != parent {
		ev.Target = child
		res := child.ProcessEvent(ev)

		if cparent := ClippedParent(child); cparent != nil && cparent != child {
			cparent.ProcessEvent(ev)
		}

		return res
	}

	return false
}
func SendEventToChild ( parent Control , ev Event ) bool { var child Control if IsMouseClickEvent ( ev ) { child = ChildAt ( parent , ev . X , ev . Y ) if child != nil && ! child . Active ( ) { ActivateControl ( parent , child ) } } else { child = ActiveControl ( parent ) } if child != nil && child != parent { ev . Target = child res := child . ProcessEvent ( ev ) if cparent := ClippedParent ( child ) ; cparent != nil && cparent != child { cparent . ProcessEvent ( ev ) } return res } return false }
// SendEventToChild tries to find a child control that should recieve the evetn
// For mouse click events it looks for a control at coordinates of event,
// makes it active, and then sends the event to it.
// If it is not mouse click event then it looks for the first active child and
// sends the event to it if it is not nil
SendEventToChild tries to find a child control that should recieve the evetn For mouse click events it looks for a control at coordinates of event makes it active and then sends the event to it . If it is not mouse click event then it looks for the first active child and sends the event to it if it is not nil