• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: nswindow close button for my splitview does not display cross while mouse hover
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nswindow close button for my splitview does not display cross while mouse hover


  • Subject: Re: nswindow close button for my splitview does not display cross while mouse hover
  • From: Kyle Sluder <email@hidden>
  • Date: Tue, 16 Oct 2012 07:51:18 -0700

On Tue, Oct 16, 2012, at 12:35 AM, Sanjay Arora wrote:
> Hi,
> I am creating a  new Button like the window's close button to attach it
> to my  splitview to give is same close action.
>
> The problem is the button does not displays cross while I the hover mouse
> over it.
>
> NSButton *closeControl = [NSWindow
> standardWindowButton:NSWindowCloseButton forStyleMask:[myNSWindow
> styleMask]];
> [myNSView addSubview: closeControl];
>
> Setting it as highlight does not help, it showsup the pressed state. Is
> there a setting that I am missing?

You're probably better off creating your own similar-looking button.

But before you do, try installing an NSTrackingArea that covers your
button and sending its cell -mouseEntered: and -mouseExited: when the
mouse enters/exits the tracking area. There's no guarantee that this is
how AppKit implements this functionality, but it's worth a shot.

You might also consider filing a bug asking for a standard way to tell
an NSCell that it should draw as if the mouse is over it (rather than
just informing it that the mouse has entered/exited and letting it make
its own decision). As you noticed, "highlighted" does not refer to this
state.

--Kyle Sluder
_______________________________________________

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

References: 
 >how to record audio from speaker on ios (From: WUQWE <email@hidden>)

  • Prev by Date: Re: how to record audio from speaker on ios
  • Next by Date: Re: nswindow close button for my splitview does not display cross while mouse hover
  • Previous by thread: Re: how to record audio from speaker on ios
  • Next by thread: Re: how to record audio from speaker on ios
  • Index(es):
    • Date
    • Thread