|
From: Kevin A. <al...@se...> - 2002-01-01 19:38:10
|
I've added an HtmlWindow component and simpleBrowser sample to test the HtmlWindow component. I do not know how this component will evolve in PythonCard because it seems to be in flux in wxWindows and its main purpose seems to be to support Windows-style Help files. I'm adding HtmlWindow, so that we can at least experiment with it. The component doesn't support normal event bindings for OnLinkClicked, OnCellMouseHover, etc. so we will have to fabricate our own virtual events depending once again on how wxHtmlWindow changes in wxWindows. I did not add HtmlWindow to the resourceEditor and don't plan to until the future of the component is clearer. ka --- from the readme.txt: simpleBrowser is not designed to be a full web browser. The default URL is set to http://diveintopython.org/toc.html, but you can change that in the resource file. Due to limitations in HtmlWindow and the underlying wxHtmlWindow class, both the HtmlWindow component and the simpleBrowser sample are likely to change a great deal between releases. wxHtmlWindow does not have event bindings, nor can you select the text in the control. As of wxPython 2.3.2.1, the underlying wxHtmlWindow class does not send a Host: header to web servers, so servers expecting a full HTTP/1.1 request will generally return an error page. This includes almost all Apache servers, including SourceForge. The next version of wxHtmlWindow and wxPython should fix this problem so that the control works with more servers. I recommend working with HTML files on your local system to avoid HTTP server issues. The control does not support frames, JavaScript, and many other more advanced HTML features. Just try it with files on your local system to see what does and doesn't work. I think that it does give us a very simple way to do non-editable styled text with embedded images, tables, etc. and this is the area I would like to explore. It is not going to give us the power of Mozilla or the Internet Explorer ActiveX control. The underlying wxHtmlWindow control does support embedding other wxWindows classes in HTML and while this is fairly advanced, it is also very powerful. See the wxPython demo.py for an example. We should keep this in mind as the framework progresses. See the wxWindows/wxPython help file for more info on HTML classes. |