func ChildAt(parent Control, x, y int) Control {
	px, py := parent.Pos()
	pw, ph := parent.Size()
	if px > x || py > y || px+pw <= x || py+ph <= y {
		return nil
	}

	if len(parent.Children()) == 0 {
		return parent
	}

	var ctrl Control
	ctrl = parent
	for _, child := range parent.Children() {
		if !child.Visible() {
			continue
		}

		check := ChildAt(child, x, y)
		if check != nil {
			ctrl = check
			break
		}
	}

	return ctrl
}
func ChildAt(parent Control, x, y int) Control {
	px, py := parent.Pos()
	pw, ph := parent.Size()
	if px > x || py > y || px+pw <= x || py+ph <= y {
		return nil
	}

	if len(parent.Children()) == 0 {
		return parent
	}

	var ctrl Control
	ctrl = parent
	for _, child := range parent.Children() {
		if !child.Visible() {
			continue
		}

		check := ChildAt(child, x, y)
		if check != nil {
			ctrl = check
			break
		}
	}

	return ctrl
}
func ChildAt ( parent Control , x , y int ) Control { px , py := parent . Pos ( ) pw , ph := parent . Size ( ) if px > x || py > y || px + pw <= x || py + ph <= y { return nil } if len ( parent . Children ( ) ) == 0 { return parent } var ctrl Control ctrl = parent for _ , child := range parent . Children ( ) { if ! child . Visible ( ) { continue } check := ChildAt ( child , x , y ) if check != nil { ctrl = check break } } return ctrl }
// ChildAt returns the children of parent control that is at absolute
// coordinates x, y. Returns nil if x, y are outside parent control and
// returns parent if no child is at x, y
ChildAt returns the children of parent control that is at absolute coordinates x y . Returns nil if x y are outside parent control and returns parent if no child is at x y