make sure layout is done after adding widget.