]> git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/PyColourChooser.py
warning fix
[wxWidgets.git] / wxPython / demo / PyColourChooser.py
1
2 import wx
3 import wx.lib.colourchooser as cc
4
5 #---------------------------------------------------------------
6
7 class TestColourChooser(wx.Panel):
8 def __init__(self, parent, log):
9 wx.Panel.__init__(self, parent, -1)
10 self.log = log
11
12 chooser = cc.PyColourChooser(self, -1)
13 sizer = wx.BoxSizer(wx.VERTICAL)
14 sizer.Add(chooser, 0, wx.ALL, 25)
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 = """
28 The PyColourChooser component creates a colour chooser window
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
38 The demo (demo/PyColourChooser.py code shows how to display
39 a colour chooser and retrieve its options.
40
41 Contact and Author Info
42 ------------------------------
43
44 PyColourChooser was written and is maintained by:
45
46 Michael Gilfix <mgilfix@eecs.tufts.edu>
47
48 You can find the latest PyColourChooser code at
49 http://sourceforge.net/projects/wxcolourchooser/. If you have
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])] + sys.argv[1:])