[Haskell-cafe] wxHaskell htmlWindow usage
David Owen
d_w_o at hotmail.com
Tue Mar 15 09:51:26 EST 2005
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
More information about the Haskell-Cafe
mailing list