• 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
Problem with submenus
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with submenus


  • Subject: Problem with submenus
  • From: Jesus De Meyer <email@hidden>
  • Date: Thu, 11 Apr 2002 21:11:00 +0200

I'm creating an app uses NSPopUpButtons with Submenus. Those submenus are created programmatically. The problem I'm having is that the items on the submenu are not made active even if explecitly tell them to be active.

Here 's a piece of my code of one submenu:

NSMenu *fMenu = [[NSMenu alloc] initWithTitle:@"test"];
[fMenu addItemWithTitle:@"Hey! Same team!" action:nil keyEquivalent:@""];
[fMenu addItemWithTitle:@"On your team" action:nil keyEquivalent:@""];

[[speechMenu menu] setSubmenu:fMenu forItem:[speechMenu itemAtIndex:1]];

for (i=0; i < [fMenu numberOfItems]; i++) {
[[fMenu itemAtIndex:i] setEnabled:YES];
}

//speechMenu is an NSPopUpButton created in IB


Thanks in advance

______________________________
Jesus De Meyer
CEO @ E dot software
http://homepage.mac.com/edotsoftware
_______________________________________________
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.

  • Prev by Date: Re: Creating a checkbox
  • Next by Date: [ANN] CURLHandle 1.5 released
  • Previous by thread: Re: Printing question
  • Next by thread: [ANN] CURLHandle 1.5 released
  • Index(es):
    • Date
    • Thread