1. HyperText within a Euphoria program?
- Posted by DanM Dec 12, 2008
- 1139 views
Does anyone have any idea how I might make an emulation of a hypertext browser within a Euphoria program?
What I mean is, say a program writes various text onto a portion of a window for the user.
I'd like to make it possible for the user to click on certain words there and thereby cause that display of text to show another, different page of text, all within the base program's display window, alongside various other elements of the display.
How?
Dan
2. Re: HyperText within a Euphoria program?
- Posted by mattlewis (admin) Dec 12, 2008
- 1151 views
Does anyone have any idea how I might make an emulation of a hypertext browser within a Euphoria program?
What I mean is, say a program writes various text onto a portion of a window for the user.
I'd like to make it possible for the user to click on certain words there and thereby cause that display of text to show another, different page of text, all within the base program's display window, alongside various other elements of the display.
How?
wxEuphoria has a wxHtmlWindow control. Rather than loading text files, you can load any data you want. Additionally, you can intercept clicks on a hyperlink.
Matt
3. Re: HyperText within a Euphoria program?
- Posted by DanM Dec 12, 2008
- 1102 views
Does anyone have any idea how I might make an emulation of a hypertext browser within a Euphoria program?
What I mean is, say a program writes various text onto a portion of a window for the user.
I'd like to make it possible for the user to click on certain words there and thereby cause that display of text to show another, different page of text, all within the base program's display window, alongside various other elements of the display.
How?
wxEuphoria has a wxHtmlWindow control. Rather than loading text files, you can load any data you want. Additionally, you can intercept clicks on a hyperlink.
Matt
I'll have to look at/into wxEuphoria before I ask any more questions
Dan
4. Re: HyperText within a Euphoria program?
- Posted by ghaberek (admin) Dec 12, 2008
- 1114 views
I'll have to look at/into wxEuphoria before I ask any more questions
Dan
LOL
5. Re: HyperText within a Euphoria program?
- Posted by DanM Dec 13, 2008
- 1097 views
I'll have to look at/into wxEuphoria before I ask any more questions
Dan
LOL
Ok, now I've looked at wxEuphoria a little, and I do have questions!
I tried to modify "splitter_demo.exw", in order to make an html window in only a portion of the main window, but when I did so, the mod wouldn't run..didn't crash, or error, just didn't RUN.
Here's how I modified splitter: I replaced:
text4 = create( wxTextCtrl, {splith2, -1, "Text Control 4", -1, -1, -1, -1})
with:
html = create( wxHtmlWindow, {splith2, -1, "button 4", -1, -1, -1, -1})
(the "button4" in the above is just a leftover from putting a button into the 4th split section, to see if I could make ANY kind of mod to the splitter that would work)
I also changed a line further down to be:
split_window( splith2, vpanel, html, wxHORIZONTAL, 0 )
So, is there any way to put a html window into just a part of a main window, & if so, how?
Dan
6. Re: HyperText within a Euphoria program?
- Posted by ghaberek (admin) Dec 15, 2008
- 1116 views
Ok, now I've looked at wxEuphoria a little, and I do have questions!
I tried to modify "splitter_demo.exw", in order to make an html window in only a portion of the main window, but when I did so, the mod wouldn't run..didn't crash, or error, just didn't RUN.
Anytime this happens, run your program on a command line, like this:
> exwc myprogram.exw
You'll probably see it output "Stack data corrupted!" or something similar. This indicates you passed an invalid number of arguments to create(). (See below.) I'm trying to come up with a more graceful way to prevent such issues. I think I'll need to implement some of wxWidgets' own error reporting functionality, though that's probably a few releases away...
Here's how I modified splitter: I replaced:
text4 = create( wxTextCtrl, {splith2, -1, "Text Control 4", -1, -1, -1, -1})
with:
html = create( wxHtmlWindow, {splith2, -1, "button 4", -1, -1, -1, -1})
(the "button4" in the above is just a leftover from putting a button into the 4th split section, to see if I could make ANY kind of mod to the splitter that would work)
I also changed a line further down to be:
split_window( splith2, vpanel, html, wxHORIZONTAL, 0 )
So, is there any way to put a html window into just a part of a main window, & if so, how?
When it comes to using wxEuphoria, the docs are your best friend. Unlike Win32Lib, which uses a standard create() layout, in wxEuphoria each control has a variable and unique number of arguments. See the docs for wxHtmlWindow:
Creation Parameters
- parent
- id [=-1]
- x [=-1]
- y [=-1]
- cx [=-1]
- cy [=-1]
- style [=wxHW_SCROLLBAR_AUTO]
- wxHW_SCROLLBAR_NEVER
- wxHW_SCROLLBAR_AUTO
Note, there is no text parameter listed. This is different from wxTextCtrl, which includes text as the third parameter.
-Greg
7. Re: HyperText within a Euphoria program?
- Posted by DanM Dec 16, 2008
- 1153 views
In other words, RTFM, Dan!
Will do, and thanks!
Dan