iSync-like toolbar and scrolling
iSync-like toolbar and scrolling
- Subject: iSync-like toolbar and scrolling
- From: David Catmull <email@hidden>
- Date: Mon, 24 Jan 2005 14:28:01 -0700
I want to make a toolbar like the one in iSync, where (in my case) a
list of computers appears at the top of the window. The question is
what to do when the window is too narrow to show all the icons. iSync
just makes its non-user-resizable window wider if necessary, but I want
my window to be user-resizable.
iSync uses a custom view for the toolbar. I thought it would be easier
to use an NSMatrix with a custom cell class, so that's my current
approach. For one thing, it makes it easier to set up bindings
(specifically selectedIndex) since this is a "master-detail" type of
interface.
I experimented with putting it inside a scroll view, but that doesn't
interact well with the metal window background (at least not in Test
Interface mode). The background pattern got scrolled along with
everything else. I tried setting the scroll view's background color to
a transparent color, but it came out black. I couldn't figure out how
to restore the original color setting (it displayed the pinstripes in
the color box). Also, it thought there was twice as much scrolling area
as there really was: the scroll bar should have been auto-hidden, but
instead the thumb was half the length of the track.
I might hide the scroll bar altogether and provide other scrolling
controls, but the background issues would persist. I could use a white
background for the scroll view, but I don't like the way that looks. I
could abandon the metal look altogether (I hate the Finder/Safari metal
as much as anyone), but since I think it's actually appropriate in this
case I'd rather keep it.
Can I expect the background problems I see in Test Interface mode to
happen in the real app? If so, is there an easy workaround?
And how do I get my scroll view back to the default "background
pattern" background color?
--
David Catmull
email@hidden
http://www.uncommonplace.com/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden