use binary search to insert widget in ordered slot