Panel:Dock
Example
Example docking including DockMargin. Provided by Walrus Viking in this Facepunch post.
Output: ![](//files.facepunch.com/wiki/files/panel_dock_example1.png)
![](http://files.facepunch.com/wiki/files/panel_dock_example1.png)
Example
Example showing how multiple docked elements behave.
Output: ![](//files.facepunch.com/wiki/files/panel_dock_example_2.png)
![](http://files.facepunch.com/wiki/files/panel_dock_example_2.png)
Sets the dock type for the panel, making the panel "dock" in a certain direction, modifying it's position and size.
You can set the inner spacing of a panel's docking using Panel:DockPadding, which will affect docked child panels, and you can set the outer spacing of a panel's docking using Panel:DockMargin, which affects how docked siblings are positioned/sized.
You may need to use Panel:SetZPos to ensure child panels (DTextEntry) stay in a specific order.
true
as argument if you need to update immediately)Example docking including DockMargin. Provided by Walrus Viking in this Facepunch post.
Example showing how multiple docked elements behave.