• 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
How to get NSPathControl to resize programatically?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to get NSPathControl to resize programatically?


  • Subject: How to get NSPathControl to resize programatically?
  • From: Robert Monaghan <email@hidden>
  • Date: Tue, 9 Mar 2010 12:26:14 -0800

Hi Everyone,

I am changing the NSURL of a path, that drives NSPathControl.
If I edit the path so that the new text element of that path is longer or shorter than the original path,
I would need to have NSPathControl redraw itself..

Here is an example of what I am doing:

(myPathControl is a NSPathControl object.)

NSPathComponentCell *cell = [myPathControl clickedPathComponentCell];
NSString *searchPath = [[cell URL] path];
NSURL *newPathURL = [NSURL fileURLWithPath:[[searchPath stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"NEWTEXT"]];
[cell setURL:newPathURL];
[cell setTitle:@"NEWTEXT"];
[myPathControl updateCell:cell];
[myPathControl setNeedsDisplay:YES];

This does make the change to the NSPathControl, and I get a new URL when I request one, but I can't figure out how to get the NSPathControl to redraw itself,
taking into account the new Cell sizes.

Any suggestions? Do I have to brute-force a resize of the cell and calculate it myself??

Thanks!

bob..

_______________________________________________

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

  • Follow-Ups:
    • Re: How to get NSPathControl to resize programatically?
      • From: "Sean McBride" <email@hidden>
  • Prev by Date: Re: Question Re Memory Management in Apps
  • Next by Date: Re: Question Re Memory Management in Apps
  • Previous by thread: keeping scrollbar hidden
  • Next by thread: Re: How to get NSPathControl to resize programatically?
  • Index(es):
    • Date
    • Thread