[wxpython-users] FloodFill on OSX
Peter Damoc
pdamoc at gmail.com
Tue Apr 1 23:30:25 PDT 2008
Tim,
try using:
wx.FLOOD_BORDER
or 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 at 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 =3D 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
> wxpython-users at lists.wxwidgets.org
> http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
>
>
-- =
There is NO FATE, we are the creators.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200804=
02/2ff4cf06/attachment.htm
More information about the wxpython-users
mailing list