Panel.MoveBelow

From GMod Wiki

Jump to: navigation, search
Function
Syntax Panel:MoveBelow( Panel Panel[, Integer Offset] )
Description:
This is a positioning utility for VGUI elements, allowing you to move an element below another element.
Returns: nil
In Object: Panel
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Panel.MoveBelow]Panel.MoveBelow [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionMove a button below another button.
Used onNewerClient.png
Code
 
local disp1 = vgui.Create("DFrame")
disp1:SetPos(0,200)
disp1:SetSize(400,500)
disp1:Center()
 
local button1 = vgui.Create("DButton",disp1)
button1:SetText("Click me!")
button1:Center()
 
local button2 = vgui.Create("DButton",disp1)
button2:SetText("Click me!")
button2:Center()
button2:MoveBelow(button1,20)
 
OutputButton2 is placed 20 pixels below Button1.


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox