Tkinter canvas drag/drop obstacle
Peter Pearson
ppearson at nowhere.invalid
Sun Jun 22 22:41:53 EDT 2008
On Fri, 20 Jun 2008 13:41:35 -0300, Guilherme Polo <ggpolo at gmail.com> wrote:
> On Fri, Jun 20, 2008 at 1:11 PM, Peter Pearson <ppearson at nowhere.invalid> wrote:
>> Tkinter makes it very easy to drag jpeg images around on a
>> canvas, but I would like to have a "target" change color when
>> the cursor dragging an image passes over it. I seem to be
>> blocked by the fact that the callbacks that might tell the
>> target that the mouse has entered it (<Enter>, <Any-Enter>,
>> even <Motion>) aren't called if the mouse's button is down.
>> What am I missing? Have I failed to find the right Tkinter
>> document? Is Tkinter the wrong tool for this job? Thanks.
>>
>
> I believe the only way to achieve this is binding <Motion> to the
> entire canvas, then checking if the x, y coords are inside the
> "target".
Ugh. OK, thanks.
--
To email me, substitute nowhere->spamcop, invalid->net.
More information about the Python-list
mailing list