Thanks Chris for answer and example ! Indeed, it works great like this (except if we release the mouse button up *outside* of the main Frame window : then self.InSelectMode remains "True")
Best regards, J 2014-02-19 6:21 GMT+01:00 Chris Barker <[email protected]>: > On Tue, Feb 18, 2014 at 12:51 AM, Nouvelle Collection < > [email protected]> wrote: > >> I would like to bind to a Button the fact of : >> 1) left-clicking-down (this is done successfully with >> mybtn.Bind(FloatCanvas.EVT_FC_LEFT_DOWN, self.OnClick) ) >> 2) but also : motion/hover over the button when the mouse left button is >> still clicked down >> >> (Thus, the user can enable 10 buttons quickly by clicking just once on >> the first, and then motion over the 9 other buttons while mouse is still >> clicked down.... This is faster than clicking 10 times on each button, and >> it would be useful for my app). >> >> Do you know how to do 2) with FloatCanvas ? >> > > On the left click on your objects, set a flag to True > > Bind the left up event on the Canvas: > > FC.EVT_LEFT_UP(Canvas, self.OnUp) > > in that, set the flag to False > > on the object, bind the enter event: > > rect.Bind(FC.EVT_FC_ENTER_OBJECT, self.OnEnter) > > if the flag is True -- you can set that as a selected object. > > See enclosed example ;-) > > -Chris > > > > > >> Best regards, J >> >> _______________________________________________ >> FloatCanvas mailing list >> [email protected] >> http://mailman.paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas >> >> > > > -- > > Christopher Barker, Ph.D. > Oceanographer > > Emergency Response Division > NOAA/NOS/OR&R (206) 526-6959 voice > 7600 Sand Point Way NE (206) 526-6329 fax > Seattle, WA 98115 (206) 526-6317 main reception > > [email protected] > > _______________________________________________ > FloatCanvas mailing list > [email protected] > http://mailman.paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas > >
_______________________________________________ FloatCanvas mailing list [email protected] http://mailman.paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas
