At 20:10 23/09/2004 -0500, Ted Campbell wrote:
>The problem I'm having now is that the HtmlWindow.text field only seems to
>accept a filename or URL, but not literal text. I'd like to be able to
>say, e.g.,
>
> HtmlWindow1.text = 'This is <b>sample</b> text'
>
>and have that displayed as HTML text in the window. Any chance the
>HtmlWindow component could be tweaked to allow that?
If the first character of the text being set is a "<" then it will do what
you want -
>HtmlWindow1.text = '<p>This is <b>sample</b> text</p>'
otherwise it interprets the text as a URL name to load.
If it's not convenient to ensure that the first char is a "<", then you can
instead call SetPage
> HtmlWindow1.SetPage('This is <b>sample</b> text')
btw - this answer is from a combination of docs and source code - i.e. I
haven't actually test it - but I'm fairly sure it's right. If not, my
apologies ....
-- Alex.
|