[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Coordinates inside a button
From: |
Dr. H. Nikolaus Schaller |
Subject: |
Re: Coordinates inside a button |
Date: |
Mon, 17 Dec 2012 08:08:58 +0100 |
Am 17.12.2012 um 06:45 schrieb Germán A. Arias:
> Inside a window the coordinates system has its origin at the lower left
> corner, and X axis is positive to the right, and Y axis is positive to
> up. But inside a button I found that the origin is at upper left corner,
> and that Y axis is positive to down. See attached app to test it. This
> app prints at shell the coordinates where the mouse was clicked inside
> the button. Is this the expected behaviour?
Yes. Please check the influence of -[NSView isFlipped].
It is overwritten in NSButton (which is a subclass of NSView) to
return YES.