|
From: | Andreas Höschler |
Subject: | Re: NSTableColumn resizing problem |
Date: | Thu, 24 Apr 2008 21:55:42 +0200 |
Hi Fred,
I find it rather difficult to resize columns in a tableview. One has toreally hit the thin line separating two column for being able to do so which seems to be only one pixel wide. How can we make this moretolerant? On Mac OSX this even works if the mouseDown event 3-4 pixelsto the left or right of the column separator line?I think the code for this is in [NSTableHeaverView mouseDown:]. Could you please experiment with that and report back suitable pixel values?
Thanks a lot for this hint. I finally found time to look into the issue. I am using the value 4 at the marked locations now.
... if ([_tableView allowsColumnResizing]) { /* Start resizing if the mouse is down on the bounds of a column. */ if (location.x >= NSMaxX (rect) - 4) // <------- BUST { if (columnIndex != ([_tableView numberOfColumns])) { _resizedColumn = columnIndex; } else { NSLog(@"ohoh"); } } else if (location.x <= NSMinX (rect) + 4) // <------- BUST { if (columnIndex > 0) { _resizedColumn = columnIndex - 1; } } } ...This makes me a happy camper! I recommend these values for the public tree.
Regards, Andreas
[Prev in Thread] | Current Thread | [Next in Thread] |