X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b881fc787d2823bdd8a415080b82feee90804a17..f78e4942ec0f3f6abd2992502e2d6c5c2e8e55f6:/wxPython/wx/lib/colourchooser/pycolourbox.py diff --git a/wxPython/wx/lib/colourchooser/pycolourbox.py b/wxPython/wx/lib/colourchooser/pycolourbox.py index 0e9bf155f8..a1108c7b1c 100644 --- a/wxPython/wx/lib/colourchooser/pycolourbox.py +++ b/wxPython/wx/lib/colourchooser/pycolourbox.py @@ -1,10 +1,10 @@ """ -wxPyColourChooser +PyColourChooser Copyright (C) 2002 Michael Gilfix -This file is part of wxPyColourChooser. +This file is part of PyColourChooser. -This version of wxPyColourChooser is open source; you can redistribute it +This version of PyColourChooser is open source; you can redistribute it and/or modify it under the licensed terms. This program is distributed in the hope that it will be useful, @@ -15,6 +15,11 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # o 2.5 compatability update. # +# 12/21/2003 - Jeff Grimmett (grimmtooth@softhome.net) +# +# o wxPyColorChooser -> PyColorChooser +# o wxPyColourChooser -> PyColourChooser +# import wx @@ -28,12 +33,12 @@ class PyColourBox(wx.Panel): def __init__(self, parent, id, colour=(0, 0, 0), size=(25, 20)): """Creates a new colour box instance and initializes the colour content.""" - wx.Panel.__init__(self, parent, id, size=size) + wx.Panel.__init__(self, parent, id, size=size, style=wx.NO_BORDER) - self.colour_box = wx.Panel(self, -1, style=wx.SIMPLE_BORDER) + self.colour_box = wx.Window(self, -1, style=wx.SIMPLE_BORDER) sizer = wx.GridSizer(1, 1) - sizer.Add(self.colour_box, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_CENTER_HORIZONTAL) + sizer.Add(self.colour_box, 0, wx.FIXED_MINSIZE | wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_CENTER_HORIZONTAL) sizer.SetItemMinSize(self.colour_box, size[0] - 5, size[1] - 5) self.SetAutoLayout(True) self.SetSizer(sizer)