Am 10.04.2014 um 12:11 schrieb Marnaud <[email protected]>:

> How do I go from a PopupMenu to a NSMenuMBS? The NSMenuMBS has no constructor 
> (that I found) with a PopupMenu parameter and the PopupMenu has nothing to 
> get a NSMenuMBS (I also checked NSViewMBS, NSPopupButtonMBS and NSControlMBS 
> properties of the PopupMenu).

maybe like this:

  dim pb as NSPopUpButtonMBS = PopupMenu1.NSPopUpButtonMBS
  dim menu as NSMenuMBS = pb.menu
  dim handle as integer = menu.CarbonMenuRef

> In the meantime, I commented out the test (so all popup menus are processed); 
> I've been able to set a PopupMenu's menu item to bold or underline, but 
> enabled=false doesn't disable the item (it did in Carbon); and disabling a 
> menu item is exactly what I want to achieve. Do you happen to know that 
> disabling a menu item in a PopupMenu is broken in Cocoa?

Well, if you have a Menu, you could get the item and set enabled flag:

  dim item as NSMenuItemMBS = menu.Item(0)
  item.Enabled = false
  

Sincerely
Christian

-- 
Read our blog about news on our plugins:

http://www.mbsplugins.de/

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to