I was just wondering if it is possible to create a drop down or popup m开发者_如何学运维enu with a hierarchy? The application I am currently working on tracks Assignments, Courses, and Subjects. When the user creates an Assignment they will need to be able to select a Course that it belongs to from a drop down but I also wan't the drop down to be organized a little bit by having headers so the user can easily see what Subject that Course belongs to.
Example:
Select Course: [drop down below]
- Life --Chores --Eating --Vacations - Math --Algebra --CalculusEtc...
Not the best example but the entries "Life" and "Math" would be bold and unselectable and all of the others would be regular menu items. Does anyone have any suggestions? Let me know if you need more information on what I am trying to do.
Yes, if you build them manually in code or in Interface Builder. No, if you're using Bindings.
NSPopUpButton takes an NSMenu full of NSMenuItems.
精彩评论