• 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: How to build a popup menu and show this menu?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to build a popup menu and show this menu?


  • Subject: Re: How to build a popup menu and show this menu?
  • From: Scott Anguish <email@hidden>
  • Date: Thu, 23 Feb 2006 02:10:13 -0500


On Feb 23, 2006, at 2:01 AM, wlq wrote:

I means that I want show a popup menu when my window receive
right mouse down message.
In fact, the popup menu I want to show is not a true popup menu.
This "menu"  is more like a pallete bar.
Is there some way to implement this bar?

There isn't any support for creating a popup palette like I think you're talking about. And it is a rather non-standard UI that I think you're proposing. If you want this exactly, you would need to handle it by yourself, either inserting a view into the window's hierarchy temporarily and handling everything yourself, or floating a window above the other window temporarily, and handling everything yourself...



But.. if you do this with a contextual menu (which is what most apps do it with) you'd want to create a menu in IB as joar suggested, and then set it as a context sensitive menu by overriding the NSView methods -menuForEvent: or +defaultmenu.


http://developer.apple.com/documentation/Cocoa/Reference/ ApplicationKit/ObjC_classic/Classes/NSView.html#//apple_ref/doc/uid/ 20000014-DontLinkElementID_1518

There is no significant conceptual documentation for these two methods... it is mentioned in the Application Menus and Pop-up Lists book. And the Clock Control (available via ADC) does implement it. that should be enough to get you going..



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: How to build a popup menu and show this menu?
      • From: Scott Anguish <email@hidden>
    • Re: How to build a popup menu and show this menu?
      • From: j o a r <email@hidden>
References: 
 >How to build a popup menu and show this menu? (From: "wlq" <email@hidden>)
 >Re: How to build a popup menu and show this menu? (From: j o a r <email@hidden>)
 >Re: How to build a popup menu and show this menu? (From: "wlq" <email@hidden>)

  • Prev by Date: Re: How to build a popup menu and show this menu?
  • Next by Date: Re: How to build a popup menu and show this menu?
  • Previous by thread: Re: How to build a popup menu and show this menu?
  • Next by thread: Re: How to build a popup menu and show this menu?
  • Index(es):
    • Date
    • Thread