addTrackingRect and setAutoresizingMask

  • Hi list,
    in a subclass of NSButton I added a TrackingRect

    [self addTrackingRect:[self bounds] owner:self userData:nil
    assumeInside:NO];

    to let the button detect the mouseEnter.
    It works, but since the button is anchored at the right side of the window
    (setAutoresizingMask:), when I resize the window, the tracking rect remains
    at the original point (anchored to the left side of the window). Instead I
    would like it follows the button. Should I remove and add again the tracking
    rect at any windowDidResize: ?

    Any idea?

    Best Regards
    --
    Lorenzo
    email: <archidea...>
    _______________________________________________
    cocoa-dev mailing list | <cocoa-dev...>
    Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
    Do not post admin requests to the list. They will be ignored.