 |
 |
How to make a custom pulldown menu ?
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2001
Location: The Land of Beer and Chocolates
Status:
Offline
|
|
How do I do this ? Basically , what I want to make is a pulldown menu , only instead of the white part and blue arrow part I would like to have a custom image.
Can I do this by setting something in IB or do i have to program it ? I don't have a problem with making an artificial pulldown, it doesn't have to be a standard control.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Feb 2001
Location: Vancouver, WA
Status:
Offline
|
|
By "pulldown menu" do you mean something similar to an NSPopUpButton of the PullDown style? That's pretty easy to fake a custom version of... create a subclass of NSView (or NSControl or NSButton or NSPopUpButton, depending on how much functionality you want to inherit), and on -mouseDown: display a new window (created with NSBorderlessWindowMask) on top of the button.
If by "pulldown menu" you mean one that pulls down from the menu bar, I'm not sure that's as easily possible, if it's possible at all.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2001
Location: The Land of Beer and Chocolates
Status:
Offline
|
|
Originally posted by Rickster:
<STRONG>By "pulldown menu" do you mean something similar to an NSPopUpButton of the PullDown style? That's pretty easy to fake a custom version of... create a subclass of NSView (or NSControl or NSButton or NSPopUpButton, depending on how much functionality you want to inherit), and on -mouseDown: display a new window (created with NSBorderlessWindowMask) on top of the button.
If by "pulldown menu" you mean one that pulls down from the menu bar, I'm not sure that's as easily possible, if it's possible at all.</STRONG>
Yeah , I mean the popup button type. Thanks for the reply , but I found a very simple way to cheat my way into a custom version . I guess your way is better , but the way I do it requires a minimum of messing around with code : make an ordinary popup button , scale it to a minimum size , make an ordinary button with your custom pulldown look , make a performclick connection , and voila 
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |