Re: Contextual menu for Text fields/views?
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