move display pop menu code to (OnAttachedToWindow())