Context menu for NSTableView cell
Context menu for NSTableView cell
- Subject: Context menu for NSTableView cell
- From: Steve Pettifer <email@hidden>
- Date: Fri, 7 Oct 2005 16:08:47 +0100
Hi there,
I'm having real trouble with context menus. It goes like this: I've
got a NSTableView with a number of columns with various cell types
text, checkboxes etc, nothing fancy. I want to arrange for a context
menu to be available in one (and only one) of the text field columns
*while the text field of this column is being edited*.
I've been able to arrange a context menu that can appear when the
ctrl-click happens on the column *before* the text is being edited by
using menuForEvent on a subclassed NSTableView, and this is fine and
dandy, but i'm struggling to understand how i'm supposed to associate
the menu with the text that's being edited. From what i've read and
googled, i'm guessing that i somehow have to link the menu with the
fieldeditor, but i've not been able to find a way of identifying the
particular column i'm interested in, and of making the menu appear
only for that column/fieldeditor and not for every text column in my
table.
[The functionality i'm after is a bit like a combobox, but with a
hierarchical menu; if someone can tell me that the text of a combobox
can be made to look identical to a normal text field (i'm finding
it's not centered identically, so looks a bit rubbish), and that the
combo's menu can be made hierarchical, then that could be an
alternative that would save some trouble!]
Thanks
Steve
_______________________________________________
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