mousedown in a view
mousedown in a view
- Subject: mousedown in a view
- From: Jeff Childers <email@hidden>
- Date: Tue, 6 Sep 2005 20:43:40 -0500
the view appears to not be aligning with the tracking rect.
mouse x: 21.000000 y: 435.000000 height: 414.000000 width: 96.000000
mouse x: 21.000000 y: 23.000000 height: 414.000000 width: 96.000000
mouse x: 115.000000 y: 67.000000 height :414.000000 width: 96.000000
21 pixels hidden under left side
21 extra pixels on top edge of view and the tracking rect
29 pixels hidden on the right
23 pixels hidden on the bottom
when I draw in the view everything matches up
view size 96w 414h
- (void)mouseDown:(NSEvent *)theEvent
{
NSPoint loc = [theEvent locationInWindow];
loc.x -= [self frame].origin.x;
loc.y -= [self frame].origin.y;
NSLog(@"mouse x: %f y: %f height: %f width: %f", loc.x,loc.y,[self
frame].size.height,[self frame].size.width);
}
after some experimenting when I make subview of scrollview and set the
scrollers to small and horizonal off is when things become misaligned
how can I fix this?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden