• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSRoundRectBezelStyle still doesn't work with NSPopUpButton?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSRoundRectBezelStyle still doesn't work with NSPopUpButton?


  • Subject: NSRoundRectBezelStyle still doesn't work with NSPopUpButton?
  • From: Mason Mark <email@hidden>
  • Date: Wed, 21 Sep 2005 20:27:12 +0900

Does anybody know of a way to make NSPopUpButton work with the new Spotlight-esque NSRoundRectBezelStyle? Googles finds this question repeated here and there, but no answers.

(In case you wonder, the end goal here is to create a Spotlight search-building UI just like the 10.4 Finder's.)

I coded the Spotlight support in the next version of our app before 10.4 shipped, so I kind of gambled with he assumption that this was a pre-release bug that would be fixed for release. But it still seems broken as of 10.4.2.

The symptom is that when the bezel style of an NSPopUpButton is set to NSRoundRectBezelStyle the popup arrow is drawn in an incorrect location, no matter what you set the arrow position to.

Since the GUI designer in Interface Builder has all sorts of bugs with specifying sizes for controls, and also can't set some common control properties, I laid out all the popups in the nibs involved using IB's default widgets, and then our Spotlight framework iterates over them after the nibs are loaded to adjust their properties. (See the single-method category below.)

BUT, there still seems to be no way to make NSPopUpButton work with the new Tiger bezel style?

If true, my next step would be to try to convince my boss to allow me to just make all the popups standard Aqua popups. Then, I would have to tediously go through all the nibs and adjust them, because Aqua HIG specifies different sizes and metrics than what is actually used in the new unnamed "Spotlight" interface.

So, if somebody knows some magic, I'd be glad. (For the record, I lobbied against adopting this new "spotlight-freakout" UI, but our decision was to mimic the Finder's UI for Spotlight searching...)

Thanks for any insights,
--
Mason Mark
Five Speed Software, Inc.
http://www.fivespeed.com/iget

-------
@implementation NSPopUpButton (FiveSpeedSpotlight)
- (void)fs_convertTo20PixelSpotlightThemedPopup;
{
    [self setBezelStyle:NSRoundRectBezelStyle];
    [[self cell] setArrowPosition:NSPopUpNoArrow];
    NSRect f = [self frame];
    f.size.height = 20.0;
    [self setFrame:f];
}
@end


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: NSRoundRectBezelStyle still doesn't work with NSPopUpButton?
      • From: Ryan Britton <email@hidden>
  • Prev by Date: Re: Display RTF & RTFD file in NSTextView
  • Next by Date: Re: Mysterious warning (initialization from distinct Objective-C type)
  • Previous by thread: Re: Object from valueForKey is invalid
  • Next by thread: Re: NSRoundRectBezelStyle still doesn't work with NSPopUpButton?
  • Index(es):
    • Date
    • Thread