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