]> git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/wxPyColourChooser.py
Compatibility modules for a couple that have gone AWOL in the new namespace
[wxWidgets.git] / wxPython / demo / wxPyColourChooser.py
1 # 11/21/2003 - Jeff Grimmett (grimmtooth@softhome.net)
2 #
3 # o Updated for wx namespace
4 #
5 # 12/14/2003 - Jeff Grimmett (grimmtooth@softhome.net)
6 #
7 # o Updated URL for SF link in overview.
8 #
9 # 12/21/2003 - Jeff Grimmett (grimmtooth@softhome.net)
10 #
11 # o wxPyColorChooser -> PyColorChooser
12 # o wxPyColourChooser -> PyColourChooser
13 #
14
15 import wx
16 import wx.lib.colourchooser as cc
17
18 #---------------------------------------------------------------
19
20 class TestColourChooser(wx.Panel):
21 def __init__(self, parent, log):
22 wx.Panel.__init__(self, parent, -1)
23 self.log = log
24
25 chooser = cc.PyColourChooser(self, -1)
26 sizer = wx.BoxSizer(wx.VERTICAL)
27 sizer.Add(chooser, 0, wx.ALL, 25)
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 = """
41 The PyColourChooser component creates a colour chooser window
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
51 The demo (demo/PyColourChooser.py code shows how to display
52 a colour chooser and retrieve its options.
53
54 Contact and Author Info
55 ------------------------------
56
57 PyColourChooser was written and is maintained by:
58
59 Michael Gilfix <mgilfix@eecs.tufts.edu>
60
61 You can find the latest PyColourChooser code at
62 http://sourceforge.net/projects/wxcolourchooser/. If you have
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])])