FROM : cai qin
DATE : Thu Feb 14 21:58:41 2008
Hi guys
I am stuck in some problems about setting a custom view into menuItem in
Tiger. I know that there is a method called setView in menuItem in leopard
and it's easy to use.
But what I need is to set a custom view into menuItem in Tiger.
According to the documents latest version , NSMenu is responsible for
drawing the things , and the menuItem just encapsulates the information that
NSMenu need.
Then I find another class , NSMenuView ,that's really something I want . But
the note disappointed me again .
"NSMenuView is deprecated and is no longer used to draw menus. Calling its
methods will not affect the appearance of your menus."
Now I have no idea , even the direction to the solution .
Who's responsible for drawing the menu? NSMenu seems not to have some
drawing method.
If I want to do what I want , is that mean I have to cast my custom View to
Carbon HIView , then embed this View into menuItem ?
I 'm not familiar with the carbon things . Can anyone give me some
directions on How to setting custom view into menuItem in Tiger? or where 's
point I can get into of the NSMenu drawing method?
DATE : Thu Feb 14 21:58:41 2008
Hi guys
I am stuck in some problems about setting a custom view into menuItem in
Tiger. I know that there is a method called setView in menuItem in leopard
and it's easy to use.
But what I need is to set a custom view into menuItem in Tiger.
According to the documents latest version , NSMenu is responsible for
drawing the things , and the menuItem just encapsulates the information that
NSMenu need.
Then I find another class , NSMenuView ,that's really something I want . But
the note disappointed me again .
"NSMenuView is deprecated and is no longer used to draw menus. Calling its
methods will not affect the appearance of your menus."
Now I have no idea , even the direction to the solution .
Who's responsible for drawing the menu? NSMenu seems not to have some
drawing method.
If I want to do what I want , is that mean I have to cast my custom View to
Carbon HIView , then embed this View into menuItem ?
I 'm not familiar with the carbon things . Can anyone give me some
directions on How to setting custom view into menuItem in Tiger? or where 's
point I can get into of the NSMenu drawing method?
| Related mails | Author | Date |
|---|---|---|
| cai qin | Feb 14, 21:58 | |
| Peter Ammon | Feb 15, 04:41 |






Cocoa mail archive

