Re: NSBrowser background color
Re: NSBrowser background color
- Subject: Re: NSBrowser background color
- From: "Cathy Shive" <email@hidden>
- Date: Wed, 12 Sep 2007 16:11:23 -0400
HI Andy,
Yes, I tried to mess with the delegate method to get to the matrix
objects but it didn't do anything. From what I can understand, the
matrix is sized according the content it's displaying - in my case
nothing - so it has no height yet. I could be totally wrong, though.
I'm going to keep poking around.
Thanks!
Cathy
On 9/12/07, Andy Lee <email@hidden> wrote:
> Hi Cathy,
>
> I didn't think the NSBrowser was itself inside a scrollview.
>
> IIRC to customize NSBrowser appearance you have to mess with the
> NSMatrix instances in its columns. I did a quick search on
> CocoaBuilder and only looked at the first couple of results, which
> looked like dead ends.
>
> NSBrowser has a -matrixInColumn: method which might be useful, though
> I'm not sure how. Or maybe you could implement the -
> browser:createRowsForColumn:inMatrix: delegate method and tweak the
> NSMatrix there.
>
> --Andy
>
> On Sep 12, 2007, at 3:35 PM, Cathy Shive wrote:
>
> > Actually, that method is returning nothing!
> >
> > // I'm making the browser:
> > mFileBrowser = [[BWBrowser alloc] initWithFrame:aFrame];
> >
> > // configuring it
> > [mFileBrowser setMaxVisibleColumns:4];
> > [mFileBrowser setHasHorizontalScroller:YES];
> > [mFileBrowser setDelegate:self];
> >
> > // and asking for the scroll view
> > NSScrollView * aScrollView = [mFileBrowser enclosingScrollView];
> >
> > and after that - aScrollView is 0x0
> >
> > Is there anything obvious that I'm doing wrong here?
> >
> > On 9/12/07, Cathy Shive <email@hidden> wrote:
> >> Duh yes, thank you :)
> >>
> >> On 9/12/07, Scott Thompson <email@hidden> wrote:
> >>>
> >>>
> >>>
> >>> On Sep 12, 2007, at 1:15 PM, Cathy Shive wrote:
> >>> Hi,
> >>>
> >>> I'm trying to get my NSBrowser subclass to draw with a grey
> >>> background
> >>> instead of the default white background. From what I understand, I
> >>> need to set the background color of the browser's NSScrollView
> >>> but the
> >>> API doesn't seem to give me access to that object. Can anyone
> >>> help me
> >>> with this?
> >>>
> >>> NSBrowser is a subclass of NSView and NSView defines the method:
> >>>
> >>>
> >>> - (NSScrollView *)enclosingScrollView;
> >>>
> >>> Does that help?
> >>>
> >>> Scott
> >>>
> >>>
> >>
> > _______________________________________________
> >
> > Cocoa-dev mailing list (email@hidden)
> >
> > Please do not post admin requests or moderator comments to the list.
> > Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> >
> > Help/Unsubscribe/Update your Subscription:
> >
> > This email sent to email@hidden
>
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden