]>
Commit | Line | Data |
---|---|---|
1 | <html> | |
2 | ||
3 | <!-- 12/13/2003 - Jeff Grimmett (grimmtooth@softhome.net) | |
4 | ||
5 | o Updated for wx namespace. | |
6 | --> | |
7 | ||
8 | <head> | |
9 | <title>wxHTML does wxPython!</title> | |
10 | </head> | |
11 | <body bgcolor="#00CCFF"> | |
12 | <h2>Mixing wxPython and wxHTML</h2> | |
13 | ||
14 | The widgets on this page were created dynamically on the fly by a | |
15 | custom wxTagHandler found in wxPython.lib.wxpTag. You can look at the | |
16 | sources and doc-string <a href="../../lib/wxpTag.py">here</a>. | |
17 | ||
18 | <p> | |
19 | The button below is added to the page like this: | |
20 | ||
21 | <pre> | |
22 | <center><wxp module="wx" class="Button" width="50%"> | |
23 | <param name="label" value="It works!"> | |
24 | <param name="id" value="ID_OK"> | |
25 | </wxp></center> | |
26 | </pre> | |
27 | ||
28 | <hr> | |
29 | ||
30 | <center> | |
31 | <wxp module="wx" class="Button" width="50%"> | |
32 | <param name="label" value="It works!"> | |
33 | <param name="id" value="ID_OK"> | |
34 | </wxp> | |
35 | </center> | |
36 | ||
37 | <p> | |
38 | Notice that the <b>button click</b> event is actually caught by the panel | |
39 | that contains this window, which then logs it in the window below. | |
40 | <p> | |
41 | <hr> | |
42 | <p> | |
43 | This is the same widget reused three times, each with a different | |
44 | parameter value. Source code is <a href="../widgetTest.py">here</a>. | |
45 | <p> | |
46 | ||
47 | <wxp module="widgetTest" class="TestPanel" width=180 height=100> | |
48 | </wxp> | |
49 | ||
50 | <wxp module="widgetTest" class="TestPanel" width=180 height=100> | |
51 | <param name="bgcolor" value="#00CCFF"> | |
52 | </wxp> | |
53 | ||
54 | <wxp module="widgetTest" class="TestPanel" width=180 height=100> | |
55 | <param name="bgcolor" value="#0000FF"> | |
56 | </wxp> | |
57 | ||
58 | <p><hr><p> | |
59 | ||
60 | Recognize this one?<br> | |
61 | <wxp module="wxScrolledWindow" class="MyCanvas" height=300 width=100%> | |
62 | </wxp> | |
63 | ||
64 | <p><hr><p> | |
65 | You can also embed other wxHtmlWindows!<br> | |
66 | <center> | |
67 | <wxp module="widgetTest" class="TestHtmlPanel"> | |
68 | </wxp> | |
69 | </center> | |
70 | </body></html> |