2003-12-08 20:23:28 -05:00
|
|
|
|
|
|
|
import wx
|
|
|
|
import wx.lib.colourchooser as cc
|
2003-03-25 01:35:27 -05:00
|
|
|
|
|
|
|
#---------------------------------------------------------------
|
|
|
|
|
2003-12-08 20:23:28 -05:00
|
|
|
class TestColourChooser(wx.Panel):
|
2003-03-25 01:35:27 -05:00
|
|
|
def __init__(self, parent, log):
|
2003-12-08 20:23:28 -05:00
|
|
|
wx.Panel.__init__(self, parent, -1)
|
2003-03-25 01:35:27 -05:00
|
|
|
self.log = log
|
|
|
|
|
2003-12-22 14:09:54 -05:00
|
|
|
chooser = cc.PyColourChooser(self, -1)
|
2003-12-08 20:23:28 -05:00
|
|
|
sizer = wx.BoxSizer(wx.VERTICAL)
|
|
|
|
sizer.Add(chooser, 0, wx.ALL, 25)
|
2003-03-25 01:35:27 -05:00
|
|
|
|
|
|
|
self.SetAutoLayout(True)
|
|
|
|
self.SetSizer(sizer)
|
|
|
|
|
|
|
|
#---------------------------------------------------------------
|
|
|
|
|
|
|
|
def runTest(frame, nb, log):
|
|
|
|
win = TestColourChooser(nb, log)
|
|
|
|
return win
|
|
|
|
|
|
|
|
#---------------------------------------------------------------
|
|
|
|
|
|
|
|
overview = """
|
2003-12-22 14:09:54 -05:00
|
|
|
The PyColourChooser component creates a colour chooser window
|
2003-03-25 01:35:27 -05:00
|
|
|
that is similar to the Microsoft Windows colour chooser dialog.
|
|
|
|
This dialog component is drawn in a panel, and thus can be
|
|
|
|
embedded inside any widget (although it cannot be resized).
|
|
|
|
This colour chooser may also be substituted for the colour
|
|
|
|
chooser on any platform that might have an ugly one :)
|
|
|
|
|
|
|
|
How to use it
|
|
|
|
------------------------------
|
|
|
|
|
2003-12-22 14:09:54 -05:00
|
|
|
The demo (demo/PyColourChooser.py code shows how to display
|
2003-03-25 01:35:27 -05:00
|
|
|
a colour chooser and retrieve its options.
|
|
|
|
|
|
|
|
Contact and Author Info
|
|
|
|
------------------------------
|
|
|
|
|
2003-12-22 14:09:54 -05:00
|
|
|
PyColourChooser was written and is maintained by:
|
2003-03-25 01:35:27 -05:00
|
|
|
|
|
|
|
Michael Gilfix <mgilfix@eecs.tufts.edu>
|
|
|
|
|
2003-12-22 14:09:54 -05:00
|
|
|
You can find the latest PyColourChooser code at
|
2003-12-16 19:34:40 -05:00
|
|
|
http://sourceforge.net/projects/wxcolourchooser/. If you have
|
2003-03-25 01:35:27 -05:00
|
|
|
any suggestions or want to submit a patch, please send
|
|
|
|
it my way at: mgilfix@eecs.tufts.edu
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
import sys,os
|
|
|
|
import run
|
2004-03-04 19:06:33 -05:00
|
|
|
run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])
|