> For the complete documentation index, see [llms.txt](https://docs.rlib.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rlib.io/dev/references/uclass/attachpar.md).

# attachpar

CLIENT

`:attachpar(` [**ᵖᵃⁿᵉˡ**](https://wiki.facepunch.com/gmod/panel)  parent, [**ᵇᵒᵒˡ**](https://wiki.facepunch.com/gmod/boolean)  bNoDestroy`)`

## ▸ Parameters

&#x20;     ***`pnl`**`   ``parent`*\
&#x20;                            parent panel to attach child to

&#x20;     ***`bool`**`  ``bNoDestroy`*\
&#x20;                            determines if parent panel not destroyable

## ▸ Description

&#x20;        Attaches a child panel to the parent. \
&#x20;        Only works with specialized rlib panels such as **rlib.ui.overlay** which have func **PANEL:Attach( )**

## ▸ Notes

&#x20;        Opposite of [**uclass.attach( )**](/dev/references/uclass/attach.md)

## ▸ Example

{% tabs %}
{% tab title="Example 1" %}

```lua
local pnl_ol           = ui.new( 'rlib.ui.overlay'             )
:register              ( 'pnl_root', mod                       )

local pnl_par          = ui.rlib( mod, 'base', pnl_ol, 1       )
:candrag               ( false                                 )
:attachpar             ( pnl_ol, true                          )
```

{% endtab %}
{% endtabs %}
