1. HyperText within a Euphoria program?

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

new topic     » topic index » view message » categorize

2. Re: HyperText within a Euphoria program?

DanM said...

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

new topic     » goto parent     » topic index » view message » categorize

3. Re: HyperText within a Euphoria program?

mattlewis said...
DanM said...

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 smile

Dan

new topic     » goto parent     » topic index » view message » categorize

4. Re: HyperText within a Euphoria program?

DanM said...

I'll have to look at/into wxEuphoria before I ask any more questions smile

Dan

LOL grin

new topic     » goto parent     » topic index » view message » categorize

5. Re: HyperText within a Euphoria program?

ghaberek said...
DanM said...

I'll have to look at/into wxEuphoria before I ask any more questions smile

Dan

LOL grin

Ok, now I've looked at wxEuphoria a little, and I do have questions! smile

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

new topic     » goto parent     » topic index » view message » categorize

6. Re: HyperText within a Euphoria program?

DanM said...

Ok, now I've looked at wxEuphoria a little, and I do have questions! smile

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...

DanM said...

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:

the docs said...


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

new topic     » goto parent     » topic index » view message » categorize

7. Re: HyperText within a Euphoria program?

In other words, RTFM, Dan! smile

Will do, and thanks!

Dan

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu