NSPopUpButton, custom pop up menu

Discussion in 'Mac Programming' started by kev786, Jan 7, 2010.

  1. kev786 macrumors newbie

    Joined:
    Jan 5, 2010
    #1
    Hi ,
    I want replace draw method for pop up menu in NSPopUpButton, more exactly replace default gray background on different
    Which function I need override ?
    Thanks
     
  2. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    You need to subclass NSPopUpButton and NSPopUpButtonCell, which manages the drawing. Look at the three drawing methods used in NSButtonCell for what you need to override (or just the generic NSCell one).

    If you're trying to customize the actual menu items that show, there's not a lot you can do other than providing your own view and doing all the drawing yourself.
     

Share This Page