Re: Setting image one pulldown popup button

Shawn Erickson <[email protected]>
Newsgroups gmane.comp.macosx.devel
Message-ID <[email protected]>
On Sun, Dec 6, 2009 at 4:12 PM, Christiaan Hofman <[email protected]> wrote:
> On Mon, Dec 7, 2009 at 1:04 AM, Matt Neuburg <[email protected]> wrote:
>
> This is the code I use:
>
> overflowButton = [[NSPopUpButton alloc] initWithFrame:NSMakeRect(0, 0, 17,
> 10) pullsDown:YES];
> [overflowButton setBordered:NO];
> [[overflowButton cell] setArrowPosition:NSPopUpNoArrow];
> [[overflowButton cell] setAltersStateOfSelectedItem:NO];
> [[overflowButton cell] setBackgroundStyle:NSBackgroundStyleRaised];
> [overflowButton addItemWithTitle:@""];
> [[overflowButton itemAtIndex:0] setImage:[NSImage imageNamed:@"Overflow"]];
>
> Though I've used several other variations without any change in behavior.

How are you putting that button into a view? You sure you are actually
interacting with pop-up button you think you are?

-Shawn
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.