]>
Commit | Line | Data |
---|---|---|
e166644c | 1 | <html> |
b881fc78 RD |
2 | |
3 | <!-- 12/13/2003 - Jeff Grimmett (grimmtooth@softhome.net) | |
4 | ||
5 | o Updated for wx namespace. | |
6 | --> | |
7 | ||
e166644c RD |
8 | <head> |
9 | <title>wxHTML does wxPython!</title> | |
10 | </head> | |
11 | <body bgcolor="#00CCFF"> | |
12 | <h2>Mixing wxPython and wxHTML</h2> | |
1e4a197e RD |
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 | ||
e166644c RD |
18 | <p> |
19 | The button below is added to the page like this: | |
1e4a197e | 20 | |
e166644c | 21 | <pre> |
b881fc78 | 22 | <center><wxp module="wx" class="Button" width="50%"> |
e166644c | 23 | <param name="label" value="It works!"> |
b881fc78 | 24 | <param name="id" value="ID_OK"> |
e166644c RD |
25 | </wxp></center> |
26 | </pre> | |
1e4a197e | 27 | |
e166644c | 28 | <hr> |
1e4a197e | 29 | |
e166644c | 30 | <center> |
b881fc78 | 31 | <wxp module="wx" class="Button" width="50%"> |
e166644c | 32 | <param name="label" value="It works!"> |
b881fc78 | 33 | <param name="id" value="ID_OK"> |
e166644c RD |
34 | </wxp> |
35 | </center> | |
1e4a197e | 36 | |
e166644c RD |
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> |