]>
Commit | Line | Data |
---|---|---|
8fa876ca RD |
1 | # 11/21/2003 - Jeff Grimmett (grimmtooth@softhome.net) |
2 | # | |
3 | # o Updated for wx namespace | |
4 | # | |
b881fc78 | 5 | # 12/14/2003 - Jeff Grimmett (grimmtooth@softhome.net) |
8fa876ca | 6 | # |
b881fc78 | 7 | # o Updated URL for SF link in overview. |
8fa876ca | 8 | # |
d4b73b1b RD |
9 | # 12/21/2003 - Jeff Grimmett (grimmtooth@softhome.net) |
10 | # | |
11 | # o wxPyColorChooser -> PyColorChooser | |
12 | # o wxPyColourChooser -> PyColourChooser | |
13 | # | |
8fa876ca RD |
14 | |
15 | import wx | |
16 | import wx.lib.colourchooser as cc | |
1e4a197e RD |
17 | |
18 | #--------------------------------------------------------------- | |
19 | ||
8fa876ca | 20 | class TestColourChooser(wx.Panel): |
1e4a197e | 21 | def __init__(self, parent, log): |
8fa876ca | 22 | wx.Panel.__init__(self, parent, -1) |
1e4a197e RD |
23 | self.log = log |
24 | ||
d4b73b1b | 25 | chooser = cc.PyColourChooser(self, -1) |
8fa876ca RD |
26 | sizer = wx.BoxSizer(wx.VERTICAL) |
27 | sizer.Add(chooser, 0, wx.ALL, 25) | |
1e4a197e RD |
28 | |
29 | self.SetAutoLayout(True) | |
30 | self.SetSizer(sizer) | |
31 | ||
32 | #--------------------------------------------------------------- | |
33 | ||
34 | def runTest(frame, nb, log): | |
35 | win = TestColourChooser(nb, log) | |
36 | return win | |
37 | ||
38 | #--------------------------------------------------------------- | |
39 | ||
40 | overview = """ | |
d4b73b1b | 41 | The PyColourChooser component creates a colour chooser window |
1e4a197e RD |
42 | that is similar to the Microsoft Windows colour chooser dialog. |
43 | This dialog component is drawn in a panel, and thus can be | |
44 | embedded inside any widget (although it cannot be resized). | |
45 | This colour chooser may also be substituted for the colour | |
46 | chooser on any platform that might have an ugly one :) | |
47 | ||
48 | How to use it | |
49 | ------------------------------ | |
50 | ||
d4b73b1b | 51 | The demo (demo/PyColourChooser.py code shows how to display |
1e4a197e RD |
52 | a colour chooser and retrieve its options. |
53 | ||
54 | Contact and Author Info | |
55 | ------------------------------ | |
56 | ||
d4b73b1b | 57 | PyColourChooser was written and is maintained by: |
1e4a197e RD |
58 | |
59 | Michael Gilfix <mgilfix@eecs.tufts.edu> | |
60 | ||
d4b73b1b | 61 | You can find the latest PyColourChooser code at |
b881fc78 | 62 | http://sourceforge.net/projects/wxcolourchooser/. If you have |
1e4a197e RD |
63 | any suggestions or want to submit a patch, please send |
64 | it my way at: mgilfix@eecs.tufts.edu | |
65 | """ | |
66 | ||
67 | ||
68 | ||
69 | if __name__ == '__main__': | |
70 | import sys,os | |
71 | import run | |
72 | run.main(['', os.path.basename(sys.argv[0])]) |