Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 285275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:31:54+00:00 2026-05-12T05:31:54+00:00

What I want to do I have a circular custom NSView subclass, and I

  • 0

What I want to do

I have a circular custom NSView subclass, and I want to change the appearance of the cursor when the mouse is hovering over the circular portions of the view, but not when over the portions of the view’s rectangle that fall outside the circle.

Here’s an illustration. I would have inlined it with an image tag, but I’m too new to partake of such awesome features.

What I know so far

I know how to change the appearance of the cursor through NSCursor. I think that the best way to accomplish this for a rectangular view would be with a cursor rectangle. I know that I could receive mouseMoved events (and ought to turn them off when the mouse isn’t over this view, using mouseEntered and mouseExited), and have a simple, inexpensive way to determine if a point lies in the region of interest.

So what’s the problem then?

As far as I can tell, the system does not send mouseMoved events to a view that is not the first responder. Therefore, if I want to get mouseMoved events when the mouse is hovering over my view, I need to steal firstResponder status from whoever currently has it. If a text view has the focus, simply moving the mouse over such a view would steal it away, which is simply unacceptable from a usability standpoint.

Therefore, my question boils down to: is there a better way to do this? Can I get mouseMoved events without being the first responder?

Thanks!

I would have added the following tags: custom-views mouse-events NSCursor firstResponder
But again, I’m an SA noob so I can’t.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T05:31:54+00:00Added an answer on May 12, 2026 at 5:31 am

    I think you may just need to override the acceptsFirstResponder method in your NSView to return YES. If you don’t, then the view won’t receive any event information.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created sample circular UIScrollview.it works fine.but i want to scroll through NSTimer
I have an ImageButton: I want to make the image (circular play image) bigger.
I have a horizontal scrollView which contains 2 images.The scrollView is circular.What I want
I have one image in circular format and i want to rotate in circular
I have a circular queue of ordered items. I want to know if an
I want an circular movement of an image in JAVA, i thought I have
i want have an image and i want to set it as a background
want to have a Hyperlink-Button in a gridView in which I can display a
I have want to save a form in Symfony2, based on a form type,
I want to have a select-only ComboBox that provides a list of items for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.