Re: Setting image one pulldown popup button

Hamish Allan <[email protected]>
Newsgroups gmane.comp.macosx.devel
Message-ID <[email protected]>
On Mon, Dec 7, 2009 at 12:12 AM, Christiaan Hofman <[email protected]> wrote:
>
> On Mon, Dec 7, 2009 at 1:04 AM, Matt Neuburg <[email protected]> wrote:
>>
>> But what happens if you use *exactly* the same code as the sample code -
>> namely, the sample code itself?
>
> 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"]];

That's not the code you use; that's a fragment of the code you use.

Like Matt says -- "what happens if you use *exactly* the same code as
the sample code - namely, the sample code itself?"

What happens when you download the MenuMadness sample code, build and
run it without making any changes?

H
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.