Unable to set popUp menu for NSButtonCells.
Unable to set popUp menu for NSButtonCells.
- Subject: Unable to set popUp menu for NSButtonCells.
- From: Manish Pattath <email@hidden>
- Date: Wed, 14 May 2003 04:47:16 -0700 (PDT)
Hi All,
I have a matrix of NSButtonCells.
I am trying to get the contextual menu when doing Ctrl
click on the ButtonCells.
This is what I have done.
- (NSMenu *)menuForEvent:(NSEvent *)theEvent
{
NSButtonCell* myid;
NSArray* arr = [self cells];
[super mouseDown:theEvent];
myid = [self selectedCell];
[myid setMenu:contextMenu];
return contextMenu;
}
Here in above code contextMenu is an outlet of type
NSMenu.
I am not able to get the context menu.
Is there anything wrong in the code that I have done
or is there anything more to be done to get the
contextual menus.
Can anyone provide me with a proper piece of code or
any link that would be useful to me.
Thanks.
with rgds,
pmanish
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.