On May 9, 2014, at 02:59 , Jakob Egger <ja...@eggerapps.at> wrote:

> Adding an empty 5px spacer column at the end is possible, but an ugly hack. 
> If I can't think of anything better, I'll have to go with that.

Just to clarify the scenario for posterity, you’re envisaging a situation where:

— the user drags the right edge of the rightmost column either to the left or 
to the right

— if left, the column gets smaller, so what the user actually sees is the rest 
of the table slide to the right?

— if right, the column gets bigger, so the user sees the rest of the table 
slide left?

— in neither case does the rightmost column edge itself move to where it’s 
dragged according to the mouse pointer?

Although it’s logical and consistent, it doesn’t seem like a great user 
experience to me. (A mere opinion, I know, and so basically worthless.) I would 
have thought that the natural way to make the last column smaller would be to 
drag its left edge rightwards, and the natural way to make it bigger would be 
to make the window wider.

Technically, I think there may be a way to do what you want with a 
NSTrackingArea. You could put one that’s 5pt x row-height over the right end of 
the header cell, and write your own tracking loop that resizes the column when 
a drag starts there. (You’d have to override the table view’s hitTest: method 
to make this work.) Or even put a little view up there. It’d be a fairly hacky 
solution, but it doesn’t sound non-doable.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to