1999-09-17 01:55:00 -04:00
|
|
|
<html>
|
2003-12-16 19:34:40 -05:00
|
|
|
|
|
|
|
<!-- 12/13/2003 - Jeff Grimmett (grimmtooth@softhome.net)
|
|
|
|
|
|
|
|
o Updated for wx namespace.
|
|
|
|
-->
|
|
|
|
|
1999-09-17 01:55:00 -04:00
|
|
|
<head>
|
|
|
|
<title>wxHTML does wxPython!</title>
|
|
|
|
</head>
|
|
|
|
<body bgcolor="#00CCFF">
|
|
|
|
<h2>Mixing wxPython and wxHTML</h2>
|
2003-03-25 01:35:27 -05:00
|
|
|
|
|
|
|
The widgets on this page were created dynamically on the fly by a
|
|
|
|
custom wxTagHandler found in wxPython.lib.wxpTag. You can look at the
|
|
|
|
sources and doc-string <a href="../../lib/wxpTag.py">here</a>.
|
|
|
|
|
1999-09-17 01:55:00 -04:00
|
|
|
<p>
|
|
|
|
The button below is added to the page like this:
|
2003-03-25 01:35:27 -05:00
|
|
|
|
1999-09-17 01:55:00 -04:00
|
|
|
<pre>
|
2003-12-16 19:34:40 -05:00
|
|
|
<center><wxp module="wx" class="Button" width="50%">
|
1999-09-17 01:55:00 -04:00
|
|
|
<param name="label" value="It works!">
|
2003-12-16 19:34:40 -05:00
|
|
|
<param name="id" value="ID_OK">
|
1999-09-17 01:55:00 -04:00
|
|
|
</wxp></center>
|
|
|
|
</pre>
|
2003-03-25 01:35:27 -05:00
|
|
|
|
1999-09-17 01:55:00 -04:00
|
|
|
<hr>
|
2003-03-25 01:35:27 -05:00
|
|
|
|
1999-09-17 01:55:00 -04:00
|
|
|
<center>
|
2003-12-16 19:34:40 -05:00
|
|
|
<wxp module="wx" class="Button" width="50%">
|
1999-09-17 01:55:00 -04:00
|
|
|
<param name="label" value="It works!">
|
2003-12-16 19:34:40 -05:00
|
|
|
<param name="id" value="ID_OK">
|
1999-09-17 01:55:00 -04:00
|
|
|
</wxp>
|
|
|
|
</center>
|
2003-03-25 01:35:27 -05:00
|
|
|
|
1999-09-17 01:55:00 -04:00
|
|
|
<p>
|
|
|
|
Notice that the <b>button click</b> event is actually caught by the panel
|
|
|
|
that contains this window, which then logs it in the window below.
|
|
|
|
<p>
|
|
|
|
<hr>
|
|
|
|
<p>
|
|
|
|
This is the same widget reused three times, each with a different
|
|
|
|
parameter value. Source code is <a href="../widgetTest.py">here</a>.
|
|
|
|
<p>
|
|
|
|
|
|
|
|
<wxp module="widgetTest" class="TestPanel" width=180 height=100>
|
|
|
|
</wxp>
|
|
|
|
|
|
|
|
<wxp module="widgetTest" class="TestPanel" width=180 height=100>
|
|
|
|
<param name="bgcolor" value="#00CCFF">
|
|
|
|
</wxp>
|
|
|
|
|
|
|
|
<wxp module="widgetTest" class="TestPanel" width=180 height=100>
|
|
|
|
<param name="bgcolor" value="#0000FF">
|
|
|
|
</wxp>
|
|
|
|
|
|
|
|
<p><hr><p>
|
|
|
|
|
|
|
|
Recognize this one?<br>
|
2004-03-04 19:06:33 -05:00
|
|
|
<wxp module="ScrolledWindow" class="MyCanvas" height=300 width=100%>
|
1999-09-17 01:55:00 -04:00
|
|
|
</wxp>
|
|
|
|
|
|
|
|
<p><hr><p>
|
|
|
|
You can also embed other wxHtmlWindows!<br>
|
|
|
|
<center>
|
|
|
|
<wxp module="widgetTest" class="TestHtmlPanel">
|
|
|
|
</wxp>
|
|
|
|
</center>
|
|
|
|
</body></html>
|