X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c6281ceb776325251aa119c7b496e6152303996a..299647acac7960652aadb008775429c1f8ea9b8d:/wxPython/demo/PyColourChooser.py diff --git a/wxPython/demo/PyColourChooser.py b/wxPython/demo/PyColourChooser.py new file mode 100644 index 0000000000..b31fe51326 --- /dev/null +++ b/wxPython/demo/PyColourChooser.py @@ -0,0 +1,72 @@ +# 11/21/2003 - Jeff Grimmett (grimmtooth@softhome.net) +# +# o Updated for wx namespace +# +# 12/14/2003 - Jeff Grimmett (grimmtooth@softhome.net) +# +# o Updated URL for SF link in overview. +# +# 12/21/2003 - Jeff Grimmett (grimmtooth@softhome.net) +# +# o wxPyColorChooser -> PyColorChooser +# o wxPyColourChooser -> PyColourChooser +# + +import wx +import wx.lib.colourchooser as cc + +#--------------------------------------------------------------- + +class TestColourChooser(wx.Panel): + def __init__(self, parent, log): + wx.Panel.__init__(self, parent, -1) + self.log = log + + chooser = cc.PyColourChooser(self, -1) + sizer = wx.BoxSizer(wx.VERTICAL) + sizer.Add(chooser, 0, wx.ALL, 25) + + self.SetAutoLayout(True) + self.SetSizer(sizer) + +#--------------------------------------------------------------- + +def runTest(frame, nb, log): + win = TestColourChooser(nb, log) + return win + +#--------------------------------------------------------------- + +overview = """ +The PyColourChooser component creates a colour chooser window +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 +------------------------------ + +The demo (demo/PyColourChooser.py code shows how to display +a colour chooser and retrieve its options. + +Contact and Author Info +------------------------------ + +PyColourChooser was written and is maintained by: + + Michael Gilfix + +You can find the latest PyColourChooser code at +http://sourceforge.net/projects/wxcolourchooser/. If you have +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 + run.main(['', os.path.basename(sys.argv[0])])