• 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: Showing a menu after a delay...?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Showing a menu after a delay...?


  • Subject: Re: Showing a menu after a delay...?
  • From: Peter Ammon <email@hidden>
  • Date: Mon, 1 Feb 2010 14:39:52 -0800

Hi Eric,

Consider using a single-segment NSSegmentedControl.  If the NSSegmentedControl has both an action and a menu, then you will get the behavior you describe.  Furthermore, it will use the system-standard menu delay, plus make the menu available to accessibility clients.

-Peter

On Feb 1, 2010, at 1:42 PM, Eric Gorr wrote:

> What I am trying to accomplish is displaying a menu (perhaps with NSPopUpButtonCell's performClickWithFrame method) after a user clicks on a sublass of NSButton and holds the left mouse button for >= 1 second.
>
> Is anyone aware of any sample code doing this?
>
> I imagine I will need to customize the mouseDown method of NSButton with a loop that checks to see if the mouse button is still down. However, I am uncertain how to determine this. I have seen NSEvent's pressedMouseButtons method, but it only became available with the 10.6 SDK and I need something that works with 10.5.

_______________________________________________

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

  • Follow-Ups:
    • Re: Showing a menu after a delay...?
      • From: Eric Gorr <email@hidden>
References: 
 >Showing a menu after a delay...? (From: Eric Gorr <email@hidden>)

  • Prev by Date: Re: Showing a menu after a delay...?
  • Next by Date: Re: Showing a menu after a delay...?
  • Previous by thread: Re: Showing a menu after a delay...?
  • Next by thread: Re: Showing a menu after a delay...?
  • Index(es):
    • Date
    • Thread