The only problem is that I am running a huge application and while I am
drawing the rubberband it is possible to do other things around the
canvas so I cannot afford to be restricted to one function. Even if I
wanted to I could not enforce then to stay out of the menus and toolbars
because it's a completely different event cycle.
I also tried the Wx.Copy cheat and had no luck for some reason
Cole Harris
Enterasys Networks
Phone: 978-684-1652
Email: coharris@enterasys.com
www. http://www.enterasys.com
···
-----Original Message-----
From: Alex Tweedly [mailto:alex@tweedly.net]
Sent: Thursday, September 08, 2005 5:40 PM
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] wx.INVERT issues
Harris, Cole wrote:
Hi all,
I recently was informed about the SetLogicalFunction(wx.INVERT) in
order to draw a line on the screen and have it follow the cursor and
then delete the last known line coords. It works excellent except I
run
into a problem with the wx.INVERT when I use certain built in functions
of wxpython. For example if I call self.Refresh() this will act as a
call to wx.INVERT and I will lose my tracking of the procedure thus
drawing a random line and it not being erased. Is there a way to turn
it off unless you are within the function using it?
Thanks
-cole
Probably best is to put a call to GetLogicalFunction() at the start of
your function to draw the rubber-band, and then restore it when done
.....
e.g.
def rubberBand(... DC, ...):
initialMode = DC.GetLogicalFunction()
DC.SetLogicalFunction(wxINVERT)
......
// whatever you do for the rubber band ..
....
DC.SetLogicalFunction(initialMode)
return
You could cheat and simply restore it to wxCOPY (the default), and
ensure that any other places which change the mode also restore to
wxCOPY - but I prefer the above.
--
Alex Tweedly http://www.tweedly.net
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.10.19/93 - Release Date:
08/09/2005
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org