Re: Cursor above siblings
Re: Cursor above siblings
- Subject: Re: Cursor above siblings
- From: Keary Suska <email@hidden>
- Date: Fri, 09 Jan 2015 14:56:09 -0700
On Jan 9, 2015, at 6:19 AM, ecir hana <email@hidden> 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 (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