vgui HTML

Alright, so after the recent update the HTML control hasn’t been working correctly. If you use HTML:SetSize, it will make the control invisible, but it will be visible if you don’t use it, but then it’s not the correct size.

Example;

[lua]
// Visible
local Page = vgui.Create(“HTML”)
Page:OpenURL(“google.com”)
Page:Center()

// Not visible
local Page = vgui.Create(“HTML”)
Page:SetSize(400, 400)
Page:OpenURL(“google.com”)
Page:Center()
[/lua]

It used to work fine before, but not anymore. And I know it’s not just me not seeing the control, because I asked other players did they see it.

How about docking it into another panel and set the size of that panel instead?
HTML:Dock(FILL)

Good idea, I’ll try that.

Edit:

[lua]
local Dock = vgui.Create( “DFrame” )
Dock:SetSize( 400, 400 )
Dock:ShowCloseButton( true )
Dock:MakePopup()
Dock:Center()

local Page = vgui.Create( “HTML”, Dock )
Page:Dock( Dock )
Page:OpenURL( “google.com” )
Page:Center()
[/lua]

Results in the HTML control being very small, just like when SetSize is not used.

Apparently the controll broke in the last update.


Page:Dock(FILL)

FILL is a docking type.

**[Panel.Dock

http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/favicon.ico](http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index7baf.html)**

Oh, lol, sorry my bad. That seems to actually work. Would still be nice if the SetSize worked though.

And with the latest update it displays a blank white page, no matter what you do. Damn.

Can also confirm this I tweet’d garry about it to see if there is anything special we need to do now, no reply currently

Garry implemented awesomenium in gm13.