Re: Table view containing cells with both an image and text
Re: Table view containing cells with both an image and text
- Subject: Re: Table view containing cells with both an image and text
- From: Randall Meadows <email@hidden>
- Date: Wed, 10 Dec 2008 15:15:53 -0700
On Dec 10, 2008, at 2:41 PM, Corbin Dunn wrote:
On Dec 10, 2008, at 1:14 PM, Randall Meadows wrote:
- the cellFrame passed into -drawInteriorWithFrame:inView: is not
really the interior of the frame; I've had to do
No; it really is!
You're this >< close to convincing me! :)
cellFrame.origin.x -= 1, cellFrame.origin.y -= 1,
cellFrame.size.width += 3, cellFrame.size.height += 1;
Yeah, you don't want to do this; you will have re-draw issues when
the cell is invalidated. It sounds like you want to set the -
intercellSpacing to 0,0, or override the -drawRow/drawRect method
and first fill in the area with a solid background color.
Essentially, what you are doing is undoing the intercell spacing.
OK, I set intercellSpacing to (0,0), take out my hack, and:
(gdb) p (NSSize)[controlView intercellSpacing]
$1 = {
width = 0, height = 0
}
(gdb) p (NSRect)[controlView bounds]
$2 = {
origin = {
x = 0, y = 0
},
size = {
width = 425, height = 460
}
}
(gdb) p (NSRect)aCellFrame
$3 = {
origin = {
x = 0, y = 0
},
size = {
width = 422, height = 18
}
}
Notice the cellFrame is still 3 pixels narrower than the table view
itself.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden