FROM : Douglas Davidson
DATE : Sun Dec 19 22:26:55 2004
On Dec 19, 2004, at 1:16 PM, Thomas Lachand-Robert wrote:
> Le 19 déc. 04, à 21:45, Seth Willits a écrit :
>
>> On Dec 19, 2004, at 12:39 PM, Thomas Lachand-Robert wrote:
>>
>>> There is a default contextual menu for all text views, and also for
>>> text field (though I suspect it is the field editor's menu), with
>>> items like cut/copy/spell etc.
>>>
>>> What is the way to add some items to this contextual menu?
>>>
>>> Also is it possible to have a contextual menu in NSBox? Doing so in
>>> IB (connecting the "menu" outlet) doesn't work in either case.
>>
>> If you set the menu (setMenu or just use the outlet) of any view,
>> it'll use that menu as the contextual menu.
>>
>>
>>
>
> No it doesn't. I have set a menu in IB to a NSBox and a NSTextField. I
> get no contextual menu in the box, and I get the "standard" contextual
> menu for text views in the thext field.
The contextual menu used while editing a text field is supplied by the
field editor. Note that NSTextView's contextual menu starts with [self
menu], but can be significantly modified in its menuForEvent: method.
Douglas Davidson
DATE : Sun Dec 19 22:26:55 2004
On Dec 19, 2004, at 1:16 PM, Thomas Lachand-Robert wrote:
> Le 19 déc. 04, à 21:45, Seth Willits a écrit :
>
>> On Dec 19, 2004, at 12:39 PM, Thomas Lachand-Robert wrote:
>>
>>> There is a default contextual menu for all text views, and also for
>>> text field (though I suspect it is the field editor's menu), with
>>> items like cut/copy/spell etc.
>>>
>>> What is the way to add some items to this contextual menu?
>>>
>>> Also is it possible to have a contextual menu in NSBox? Doing so in
>>> IB (connecting the "menu" outlet) doesn't work in either case.
>>
>> If you set the menu (setMenu or just use the outlet) of any view,
>> it'll use that menu as the contextual menu.
>>
>>
>>
>
> No it doesn't. I have set a menu in IB to a NSBox and a NSTextField. I
> get no contextual menu in the box, and I get the "standard" contextual
> menu for text views in the thext field.
The contextual menu used while editing a text field is supplied by the
field editor. Note that NSTextView's contextual menu starts with [self
menu], but can be significantly modified in its menuForEvent: method.
Douglas Davidson
| Related mails | Author | Date |
|---|---|---|
| Thomas Lachand-Rob… | Dec 19, 21:39 | |
| Seth Willits | Dec 19, 21:45 | |
| Thomas Lachand-Rob… | Dec 19, 22:16 | |
| Douglas Davidson | Dec 19, 22:26 | |
| Seth Willits | Dec 20, 05:36 | |
| Thomas Lachand-Rob… | Dec 20, 09:36 | |
| Seth Willits | Dec 20, 21:43 |






Cocoa mail archive

