Re: How to get a Tk widget's coordinate? How to judge mouse is on a widget or not?



Donald Arseneau <asnd@xxxxxxxxx> writes:

Another thing, on some systems there is [winfo pointerx] and y,
so you can determine which widget contains the mouse pointer by

winfo containing [winfo pointerx] [winfo pointery]

Correction: That should have been

winfo containing [winfo pointerx .] [winfo pointery .]

(where "." could be replaced with any existing displayed window;
the pointer doesn't have to be on it!)

Also, instead of "some" systems, read "most" or "almost all" (avoiding
obscure exceptions and old versions).


--
Donald Arseneau asnd@xxxxxxxxx
.



Relevant Pages

  • Re: Why pointer to member function?
    ... > binary memory model of a PTMF is a function pointer. ... You are missing the fact that in general case the situation with member ... Both calls to 'foo' and consequent indirect calls to member functions ... the correction depends on the memory layout of the class (which is ...
    (comp.lang.cpp)
  • Re: strcpy - my implementation
    ... Now you are being an arse, the correction is correct. ... pointer points to an invariant. ... I was referring to the name change. ... repeatedly it will be a pointer to a later address in memory. ...
    (comp.lang.c)
  • Re: Copy of derived object from pointer to base
    ... [I take a little liberty with quotes here, ... correction to his earlier post for clarity.] ... > class Derived: public Base ... The reason to return a pointer whose type is pointer to the ...
    (microsoft.public.vc.language)
  • Re: strcpy - my implementation
    ... Now you are being an arse, the correction is correct. ... pointer points to an invariant. ... Thats why I introduced the extra "char* pc" in first place. ... repeatedly it will be a pointer to a later address in memory. ...
    (comp.lang.c)
  • Re: arbitrary array index range?
    ... "ES Kim" wrote: ... Not only is the original wrong, so is the correction. ... portably set a pointer to the location before the start of an object. ...
    (comp.lang.c)