Panel.HTMLBack

From GMod Wiki

Jump to: navigation, search
Function
Syntax Panel:HTMLBack( )
Description:
Instructs an HTML control to go back in the URL history.
Returns: nil
In Object: Panel
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Panel.HTMLBack]Panel.HTMLBack [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionGoes back to the last page, When pressed.
Used onNewerClient.png
Code
	local Web = vgui.Create( "DFrame" ) 
	Web:SetPos( 50,50 ) 
	Web:SetSize(ScrW() - 200, ScrH() - 50) 
	Web:SetTitle( "Internet" ) 
	Web:SetVisible( true )
	Web:MakePopup() 
 
	HTMLTest = vgui.Create("HTML", WebFrame)
	HTMLTest:SetPos(5,60)
	HTMLTest:SetSize(ScrW() - 666, ScrH() - 666)
	HTMLTest:OpenURL("http://www.google.com")
 
	BackButton = vgui.Create("DImageButton", WebFrame) --Creates the vgui image button
	BackButton:SetImage( "Folder/FileName" ) -- Sets the picture no need for .vmt or .vtf it auto adds it.
	BackButton:SizeToContents()
	BackButton:SetPos(10,10)
	BackButton.DoClick = function()	--When you pressed it, it'll go back.
	HTMLTest:HTMLBack( )
end 
OutputN/A


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox