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