Re: Adding an NSButton to a layer-hosted view
Re: Adding an NSButton to a layer-hosted view
- Subject: Re: Adding an NSButton to a layer-hosted view
- From: Michel Schinz <email@hidden>
- Date: Fri, 14 Nov 2008 19:33:43 +0100
Le 14 nov. 08 à 18:04, David Duncan a écrit :
AppKit doesn't do hit testing via the layer tree, so by moving the
button's layer, you've desynchronized the graphical location of the
button with the hit test location of the button. If you want to use
layer-backed AppKit views, you always need to move them via AppKit
for the graphical and logical locations to match.
That was the problem indeed, thanks a lot David! Moving the button
using setFrameOrigin: makes it behave correctly.
I'll also conclude from your answer that putting these NSControl
instances in my layer-hosted view is legal. Please correct me if I'm
wrong.
Michel._______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden