Hello, today I will show you how to use the wxHtmlWindow of wxWidgets. You would notice that it’s easy to do!!!
WxWidgets has the option to use a render engine for html in his applications, it has a lot of functions to use, like any other html browser, not so rich, but it’s ok. See this documentation.
wxHtmlWindow is not available on Graphics.UI.WX of wxHaskell, it is available on WXCore, and we can use them only importing Graphics.UI.WXCore. We can use it directly but it depent of you. I will use a function that create the object:
htmlWindow parent props = dophtml <- htmlWindowCreate parent idAny rectNull 0 “”
set phtml props
inp <- entry f [text := “http://www.joes-hardware.com”%5Dgo <- button f [text := “Get”, on command := showPage phtml inp]
showPage html inp = dourl <- get inp texthtmlWindowLoadPage html urlreturn ()
set f [layout := column 5 [ hfill $ row 5 [hfill $ widget inp , widget go ], fill $ margin 5 $ widget phtml]]