Re: Where does NSTableView get a cell's size from, if not from cellSize?
Re: Where does NSTableView get a cell's size from, if not from cellSize?
- Subject: Re: Where does NSTableView get a cell's size from, if not from cellSize?
- From: "Theodore H. Smith" <email@hidden>
- Date: Thu, 4 Aug 2005 23:48:08 +0100
On 4 Aug 2005, at 21:51, Jim Hamilton wrote:
On Aug 4, 2005, at 4:43 PM, Theodore H. Smith wrote:
How do you go about changing an NSCell's size? Basically, my rows
are drawing too big, and I want the rows to be drawn smaller.
I've subclassed NSComboBoxCell, but actually some of it's methods
never get called. cellSizeForBounds: and cellSize don't get
called. But the cell displays just fine. Where from is NSTableView
getting the cell height, then? If not from cellSize?
I don't get it.
NSCell's drawingRectForBounds: and drawWithFrame:inView: however,
do get called.
Changing the height in the rect in the method,
drawingRectForBounds: seems to have no effect! If I shrink the
height of the cell in drawWithFrame:inView: , it still doesn't
draw properly, sometimes the cell is drawn clipped, or other odd
visual stuff happens.
I'm at a loss here, again. Where do I look for the correct
information on how to resize a row?
NSTableView:
- (void)setRowHeight:(float)rowHeight;
I'm setting that already. It's being set correctly (At least I can
tell by looking at the private variables of the NSTableView).
It's actually ignoring the rowHeight, though. It seems to be grabbing
the height out of the NSCells, because when I put different NSCells
into the table, the row's are drawn is different.
However, NSCell's cellSize isn't being called. So I have no idea
where it is getting the size from.
_______________________________________________
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