Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > How to make a custom pulldown menu ?

How to make a custom pulldown menu ?
Thread Tools
Mac Elite
Join Date: Sep 2001
Location: The Land of Beer and Chocolates
Status: Offline
Reply With Quote
Apr 2, 2002, 08:42 AM
 
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
Reply With Quote
Apr 2, 2002, 11:09 AM
 
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.
Rick Roe
icons.cx | weblog
     
Mac Elite
Join Date: Sep 2001
Location: The Land of Beer and Chocolates
Status: Offline
Reply With Quote
Apr 2, 2002, 11:24 AM
 
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
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:30 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2