Hello Peter,
Thank you for your help, I tried all four possible combinations of DARKGREY/BLUE and SURFACE/BORDER, and each of them behaved exactly the same.
I’ll start messing about with the rectangles, though i’d love to know what I’m doing wrong with this bit of code.
Thanks again.
···
–
Stand Fast,
tjg.
On Tue, Apr 1, 2008 at 11:30 PM, Peter Damoc pdamoc@gmail.com wrote:
Tim,
try using:
wx.FLOOD_BORDERor change the reference color in the FloodFill to BLUE
Also, if it is a rectangle… it would look simpler if you just draw a rectangle over the grid in the right position.
Peter.
On Wed, Apr 2, 2008 at 2:57 AM, Timothy Grant timothy.grant@gmail.com wrote:
I’m just mucking about with some wxPython code and am a bit flummoxed by this behavior…
I have a window with a ‘DARKGREY’ grid painted on it. I simply want to colour the square on the grid I click in a different colour.
dc = wx.PaintDC(self) dc.SetBrush(wx.Brush('BLUE')) print dc.Brush.GetColour() dc.BeginDrawing() if dc.FloodFill((w * GRIDSIZE) + 1, (h * GRIDSIZE) + 1, 'DARKGREY', wx.FLOOD_SURFACE): print "flood successful" else: print "flood not successful" dc.EndDrawing()
The FloodFIll always prints “flood not successful” and I’m not sure what I’m doing wrong.
–
Stand Fast,tjg.
wxpython-users mailing list
–
There is NO FATE, we are the creators.
wxpython-users mailing list