def rebuild_ui ( self, ui ):
        parent = size = None

        if ui.control is not None:
            size   = ui.control.GetSize()
            parent = ui.control._parent
            info = ui.info
            ui.recycle()
            ui.info= info
            info.ui = ui

        ui.rebuild( ui, parent )

        if parent is not None:
            ui.control.SetSize( size )
            sizer = parent.GetSizer()
            if sizer is not None:
                sizer.Add( ui.control, 1, wx.EXPAND )

    #---------------------------------------------------------------------------
    #  Sets the title for the UI window:
    #---------------------------------------------------------------------------
Rebuilds a UI after a change to the content of the UI.
dataset/ETHPy150Open enthought/traitsui/traitsui/wx/toolkit.py/GUIToolkit.rebuild_ui