[Haskell-cafe] wxHaskell htmlWindow usage
Patrick Scheibe
mai99dnn at studserv.uni-leipzig.de
Tue Mar 15 16:13:04 EST 2005
Hi,
When I use the
htmlWindowLoadPage hw "./test.html"
function, everything works fine and I see the content of the test.html page.
Cheers
Patrick
On Tuesday 15 March 2005 15:51, David Owen wrote:
> Good day all,
>
> I am attempting to display html pages using wxHaskell's HtmlWindow
> functions. I am hoping that it is indeed possible for me to do just that
> and that I haven't misunderstood what HtmlWindow is used for.
>
> My code so far will create a frame, a button and an HtmlWindow and other
> assorted things. I would like an html file to be displayed in the window
> when the button is clicked. At the moment, only the path (a string) of the
> html file that I would like to display is printed in the window when the
> button is clicked.
>
> Here is some of the code i've been trying to get to do this:
>
> do
> -- the main frame
> f <- frame [text := "Browser", fullRepaintOnResize := False]
> -- create html window
> hw <- htmlWindowCreate f 1 (Rect 50 150 50 150) 5 "theWindow"
> -- 'load page' button
> go <- button f [text := "Load Page", on command := htmlWindowSetPage
> hw "c:/example.html"]
>
> (I've left out the layout part here)
>
> htmlWindowSetPage might be the wrong function to use for this or I might
> just be using it incorrectly. This may well be more complicated than I'm
> hoping it is too!
>
> Thankyou to whoever has a look at this.
>
> bye all
>
>
> David
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
More information about the Haskell-Cafe
mailing list