Garry's Mod Wiki

DHTMLControls

Description

An element providing navigation controls for a DHTML window.

Parent

Derives from Panel.

Methods

DHTMLControls:FinishedLoading()
This is used internally - although you're able to use it you probably shouldn't.
DHTMLControls:SetButtonColor( table clr )
Sets the color of the navigation buttons.
DHTMLControls:SetHTML( Panel dhtml )
Sets the DHTML element to control with these DHTMLControls.
DHTMLControls:StartedLoading()
This is used internally - although you're able to use it you probably shouldn't.
DHTMLControls:UpdateHistory( string url )
This is used internally - although you're able to use it you probably shouldn't. Basically adds an URL to the history.
DHTMLControls:UpdateNavButtonStatus()
This is used internally - although you're able to use it you probably shouldn't.

Example

local frame = vgui.Create( "DFrame" ) -- Create a container for everything frame:SetSize( 800, 600 ) frame:SetTitle( "DHTMLControls Example" ) frame:Center() frame:MakePopup() local window = vgui.Create( "DHTML", frame ) -- Our DHTML window window:SetSize( 750, 500 ) window:Center() local ctrls = vgui.Create( "DHTMLControls", frame ) -- Navigation controls ctrls:SetWide( 750 ) ctrls:SetPos( 25, 40 ) ctrls:SetHTML( window ) -- Links the controls to the DHTML window ctrls.AddressBar:SetText( "http://wiki.facepunch.com" ) -- Address bar isn't updated automatically window:MoveBelow( ctrls ) -- Align the window to sit below the controls window:OpenURL( "http://wiki.garrysmod.com" )

Page Links


Special Pages


Wikis

?

Render Time: 34ms

DB GetPage 3
Generate Html 5
SaveChanges (1) 15
Render Body 0
Render Sidebar 8