PANEL:PerformLayout
Description
Called whenever the panels' layout needs to be performed again. This means all child panels must be re-positioned to fit the possibly new size of this panel.
This can be triggered in numerous ways:
- Panel:InvalidateLayout was called this or previous frame (depending on the argument)
- Panel:SetPos called more than once on the same panel (Issue)
- A child element was added to this panel (TODO: Verify me)
- The size of this panel has changed
You should not call this function directly. Use Panel:InvalidateLayout instead.
You can use vgui_visualizelayout 1
to visualize panel layouts as they happen for debugging purposes. Panels should not be doing this every frame.
Arguments
Example
Creating a resizeable DFrame with a 'sidebar' that rescales along with the DFrame