]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/PyColourChooser.py
   3 import  wx
.lib
.colourchooser    
as  cc
 
   5 #--------------------------------------------------------------- 
   7 class TestColourChooser(wx
.Panel
): 
   8     def __init__(self
, parent
, log
): 
   9         wx
.Panel
.__init
__(self
, parent
, -1) 
  12         chooser 
= cc
.PyColourChooser(self
, -1) 
  13         sizer 
= wx
.BoxSizer(wx
.VERTICAL
) 
  14         sizer
.Add(chooser
, 0, wx
.ALL
, 25) 
  16         self
.SetAutoLayout(True) 
  19 #--------------------------------------------------------------- 
  21 def runTest(frame
, nb
, log
): 
  22     win 
= TestColourChooser(nb
, log
) 
  25 #--------------------------------------------------------------- 
  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 :) 
  36 ------------------------------ 
  38 The demo (demo/PyColourChooser.py code shows how to display 
  39 a colour chooser and retrieve its options. 
  41 Contact and Author Info 
  42 ------------------------------ 
  44 PyColourChooser was written and is maintained by: 
  46     Michael Gilfix <mgilfix@eecs.tufts.edu> 
  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 
  56 if __name__ 
== '__main__': 
  59     run
.main(['', os
.path
.basename(sys
.argv
[0])])