Re: iTunes style NSTableView and bezeled borders
Re: iTunes style NSTableView and bezeled borders
- Subject: Re: iTunes style NSTableView and bezeled borders
- From: Ryan Dingman <email@hidden>
- Date: Thu, 3 Oct 2002 17:57:32 -0700
On Thursday, October 3, 2002, at 04:51 PM, Todd Heberlein wrote:
I really like the new table style Apple uses in many of their
applications (iTunes, Backup, Sherlock, etc.). The alternating white
and light blue lines are not only aesthetically pleasing, but they are
also functional. I find it much easier to follow a line across with
light blue lines than without them.
But I have several related questions:
(1) Does Apple have any plans to make this a standard component of the
AppKit? (or is it already there?) It seems that if Apple likes it,
and if Apple wants to promote a standard look and feel, they should
make it part of the standard software objects.
Only Apple could say. This would be a nice improvement though (among
many other things that NSTableView needs).
(2) How can I put a bezeled border around my TableView object? I have
not been able to get my table to have the slight bezeled look that
iTunes NSTableView has. I have tried setting my border to
NSBezelBorder, but it appears to do nothing (i.e., same as
NSNoBorder). NSGrooveBorder and NSLineBorder do give different looks,
however.
iTunes is a Carbon application so it might not be possible to get this
look exactly. Another thing that you might try is enclosing your
NSTableView in an NSBox.
(3) To get the right object to send the setBorderType: message (the
NSScrollView), I had to call superview: twice from within my
iTableView object:
[(NSScrollView*)[[self superview] superview] setBorderType:
NSGrooveBorder];
Is there a more appropriate way to get the right class for sending the
setBorderType message?
Yes, -[NSView enclosingScrollView];
(4) Why does the documentation for NSView include the constants for a
view's border (NSBezelBorder, ..., NSNoBorder) when there appears to
be no appropriate method in NSView for using these values? For
example, NSView does not support the setBorderType: message.
Perhaps, because this is the most central location for it to be
defined. All views which choose to have a border type will ultimately
subclass NSView (and import NSView.h). It makes more sense than
sticking it in NSScrollView.h (or any other header) and having bordered
view import that header instead.
ryan
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.