Re: editing NSCell attributes inside NSOutlineView
Re: editing NSCell attributes inside NSOutlineView
- Subject: Re: editing NSCell attributes inside NSOutlineView
- From: Max Horn <email@hidden>
- Date: Thu, 6 Dec 2001 16:25:10 +0100
At 2:41 Uhr -0500 06.12.2001, Alex Reynolds wrote:
I am looking to do two things with NSCell instances inside an NSOutlineView:
-- change the font size
-- add an image to some instances of text cells in the OutlineColumn
I have looked at the API documentation for NSOutlineView and
NSTableView, but I can't figure it out. The closest method I could
see was:
- tableView:willDisplayCell:forTableColumn:row:
This is exactly what you need!
which looks like it requires an NSCell instance to begin with.
It will *give* you an NSCell. You can then modify this cell, and e.g.
add in an image or change the font etc.
Well, not fully true: if you want an editable cell with a picture and
*editable* text, you gotta provide your own NSCell. However, you set
that cell only once, after the table was created.
Any tips on how I might be able to accomplish both of these tasks?
(Or pointers to sample source code?)
The DragNDropOutlineView has an nice example on a class that display
both a picture and text similiar to how the finder does (or
NSBrowserCell, but NSBrowserCell has some, uhm, issues, at least last
time I tried to use it (under 10.0.4).
Cheers,
Max
--
-----------------------------------------------
Max Horn
Software Developer
email: <
mailto:email@hidden>
phone: (+49) 6151-494890