On Jan 9, 2015, at 6:19 AM, ecir hana <ecir.h...@gmail.com> wrote:

> I have a window with a custom view, which contains two children: a textview
> with scrollbars and a button. I would like to overlay the button over the
> textview so when I click in that area somewhere, the button receives the
> event before the textview. It kind of works, except for one thing: the
> cursor is always of the I-beam variety, even when above the button, see [1]
> and [2].
> 
> I think the problem is that the "sibling views overlap" but don't know how
> to fix it. I tried to move the button beneath the textview in hierarchy but
> that doesn't work (button is not shown) and I tried to `addTrackingArea:`
> but that doesn't work either (maybe I didn't do it the right way but then
> again, I thought NSButton has its own tracking area).
> 
> Please, how can I make the cursor change back to the default variety when
> hovering over the button? I can place the button in a custom view and work
> with that view, if that helps..?

It may have changed but my recollection is that interaction with overlapping 
views is undefined. To do what you want you either need to embed the button in 
the text content or use some sort of an overlay window.

HTH,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to