Menu

#6 marker binding failure

open
nobody
None
5
2002-03-31
2002-03-31
Anonymous
No

on windows, the following binding fails to be activated
(nothing is printed):

blt::stripchart .b
pack .b
set m [.b marker create polygon -fill {} -coords {0 0 0
1 1 1 1 0}]
.b marker bind $m <Enter> {puts enter}

Filling with a solid color makes it work.

Discussion

  • George A. Howlett

    Logged In: YES
    user_id=137748

    This is supposed to be a feature. But I'm not so sure
    that it really is.

    If you configure -fill to the empty string {}, then
    no fill color is drawn and the polygon marker is
    considered to be just the outline. Hence, <Enter>
    and <Leave> events will only trigger on the outline.
    I think this is similar to the way the canvas widget
    works.

    But this seems wrong on several counts.

    1) I don't think behavior this is documented anywhere
    in the graph manual (very bad).
    2) There's no useful distinction between a polygon marker
    with no fill and a line marker.
    3) It seems like an incredible useful thing to be able
    to bind to arbitrary regions. You should be able
    to bind to a totally invisible polygon marker.

    I don't think this will be hard to change (after all the
    behavior isn't even documented yet). Let me know
    what you think.

    --gah

     
  • Nobody/Anonymous

    Logged In: NO

    Dear George:

    I agree with your comments.

    The thing is that it works on Linux and I use that feature (in moodss) to activate the crosshair and pointer
    tracking (to display the x y values in a message area as the mouse pointer is moved) when the pointer
    enters a graph area. I notice that it did not work the same way on Windows.

    It would be great if you could make it work on Windows as well, or if that is too hard show me a way to do
    the above in another manner.

    In any case, many thanks for your great package!

    Best regards,

    Jean-Luc

     

Log in to post a comment.