Panel.Init

From GMod Wiki

(Redirected from DVScrollBar.Init)
Jump to: navigation, search
Event Hook
Hook NameInit
SyntaxPANEL:Init( )
DescriptionCalled directly after the panel is created with vgui.Create. For use in Custom VGUI panels.
ReturnsNil
Lua StateNewerClient.png
BBCode[b][url=wiki.garrysmod.com/?title=Panel.Init]Panel.Init [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionCreates a Button on the new panel, and sets its text to "Button Text", when the panel is created.
Used onNewerClient.png
Code
function PANEL:Init()
    self.button = vgui.Create("Button", self)
    self.button:SetText("Button Text")
end
OutputN/A


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox