"Small" NSBrowser
"Small" NSBrowser
- Subject: "Small" NSBrowser
- From: Bill Cheeseman <email@hidden>
- Date: Mon, 02 Dec 2002 12:22:47 -0500
The first draft of this message asked whether there is any way to create a
"small" NSBrowser. I see no checkbox for it in IB's NSBrowser Info panel,
nor any method in the class. I can easily make the text entries in the
browser small by using the browser:willDisplayCell:atRow:column: delegate
method. However, my browser needs to use small column titles and small
scroll bars, too, or it will look silly.
But then I looked at the NSBrowser header, and what did I find but a private
flags variable, and two of the flags are named "usesSmallSizeTitleFont" and
"usesSmallScrollers". So I dashed off a category on NSBrowser, and by golly
the column titles and column scroll bars on my browser are now small.
Next, I'll have to figure out how to make the horizontal scroll bar small.
Well, look, there's another private variable called "_scroller", of type
NSScroller*. A little addition to the category on NSBrowser, and YES!, I
have a working "small" NSBrowser, with practically no effort. The small
horizontal scroll bar sits at the bottom of a space sized to hold a thick
full-size scroll bar, but it looks just fine.
So, I'm curious to know why an option for a small NSBrowser isn't made
available through a public method and an IB checkbox? I'm well aware of the
pitfalls of relying on private variables, but a "small" browser is really
necessary to write browser-like utilities that can't be allowed to take up
too much screen space.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
The AppleScript Sourcebook -
http://www.AppleScriptSourcebook.com
Vermont Recipes -
http://www.stepwise.com/Articles/VermontRecipes
Croquet Club of Vermont -
http://members.valley.net/croquetvermont
_______________________________________________
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.