• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Resizing last column of NSTableView when it touches window border
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Resizing last column of NSTableView when it touches window border


  • Subject: Re: Resizing last column of NSTableView when it touches window border
  • From: Quincey Morris <email@hidden>
  • Date: Fri, 09 May 2014 10:12:59 -0700

On May 9, 2014, at 02:59 , Jakob Egger <email@hidden> 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 (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


References: 
 >Resizing last column of NSTableView when it touches window border (From: Jakob Egger <email@hidden>)
 >Re: Resizing last column of NSTableView when it touches window border (From: Jerry Krinock <email@hidden>)
 >Re: Resizing last column of NSTableView when it touches window border (From: Jakob Egger <email@hidden>)
 >Re: Resizing last column of NSTableView when it touches window border (From: Quincey Morris <email@hidden>)
 >Re: Resizing last column of NSTableView when it touches window border (From: Avery Pierce <email@hidden>)
 >Re: Resizing last column of NSTableView when it touches window border (From: Quincey Morris <email@hidden>)
 >Re: Resizing last column of NSTableView when it touches window border (From: Jakob Egger <email@hidden>)

  • Prev by Date: Re: NSNumberFormatter 10.0+ style exception with zero
  • Next by Date: How to check if file exists?
  • Previous by thread: Re: Resizing last column of NSTableView when it touches window border
  • Next by thread: Re: Resizing last column of NSTableView when it touches window border
  • Index(es):
    • Date
    • Thread