• 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: Contextual menu for Text fields/views?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Contextual menu for Text fields/views?


  • Subject: Re: Contextual menu for Text fields/views?
  • From: Seth Willits <email@hidden>
  • Date: Mon, 20 Dec 2004 12:43:05 -0800

On Dec 20, 2004, at 12:36 AM, Thomas Lachand-Robert wrote:

I don't see where there is a NSTextView in a NSTextField. I will try to hook it directly in the field editor in code. For the NSBox, thanks for the tip: that would explain why it doesn't work for me, since my box has no title. I don't understand why it doesn't work for the background of the box, though?

Whoops. Sorry. I didn't realize that it was NSTextField. I guess since I've been using NSTextView's so much lately that that's what I thought it said. But you're right, it doesn't show up in an NSTextField. I've tried connecting it in the nib, setting it in code ([field setMenu:menu]) and setting the field's cell's menu ([[field cell] setMenu:menu]) and none of those worked. I'm pretty much stumped there.


As for the box, I think the background of the view has to be a certain opacity or something. I could be way off, but you could try overriding the menuForEvent method or maybe the mouseDown if it still doesn't work.



-- Seth Willits

_______________________________________________
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


References: 
 >Contextual menu for Text fields/views? (From: Thomas Lachand-Robert <email@hidden>)
 >Re: Contextual menu for Text fields/views? (From: Seth Willits <email@hidden>)
 >Re: Contextual menu for Text fields/views? (From: Thomas Lachand-Robert <email@hidden>)
 >Re: Contextual menu for Text fields/views? (From: Seth Willits <email@hidden>)
 >Re: Contextual menu for Text fields/views? (From: Thomas Lachand-Robert <email@hidden>)

  • Prev by Date: Having a table and outline work togethor
  • Next by Date: Anybody knows how to port PCI device drivers to OSX
  • Previous by thread: Re: Contextual menu for Text fields/views?
  • Next by thread: NSArrayController and threading
  • Index(es):
    • Date
    • Thread