• 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
Re: NSSmallControlSize in programatically creating an NSPopUpButtonCell?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSSmallControlSize in programatically creating an NSPopUpButtonCell?


  • Subject: Re: NSSmallControlSize in programatically creating an NSPopUpButtonCell?
  • From: Stéphane Sudre <email@hidden>
  • Date: Mon, 26 Nov 2001 19:56:29 +0100

On lundi, novembre 26, 2001, at 06:42 , l.m.orchard wrote:

So I've got this plugin to an app I'm building which adds a column to an NSOutlineView owned by the main app. The cell in this column is an NSPopUpButtonCell, containing values like 0% 10% 20% .. 100%, etc. It's a progress indicator, giving the outline a to-do list function.

Well, everything works fine up to one point: I'm trying to set this button cell's control size to NSSmallControlSize. So, the button itself is small, but the menu items are large and so is the title in the button itself. The text in the button, then, gets cut off at the bottom. I'd just use a pop up button placed in a panel in a nib, but I can't figure out how to load up the nib just to get at the button.

So I'm trying to make it programatically. Is there something I'm missing? Here's the code I'm using to create and add the NSPopUpButton, which seems rather hackish to me but works as an initial attempt:

I believe it's a bug in Cocoa. I faced it a while ago. To solve this I coded this:

[tCell setControlSize:NSSmallControlSize];
[tCell setFont:[NSFont labelFontOfSize:[NSFont smallSystemFontSize]]];


References: 
 >NSSmallControlSize in programatically creating an NSPopUpButtonCell? (From: "l.m.orchard" <email@hidden>)

  • Prev by Date: Re: Document Icons
  • Next by Date: Re: NSSmallControlSize in programatically creating an NSPopUpButtonCell?
  • Previous by thread: NSSmallControlSize in programatically creating an NSPopUpButtonCell?
  • Next by thread: Re: NSSmallControlSize in programatically creating an NSPopUpButtonCell?
  • Index(es):
    • Date
    • Thread