How to get NSPathControl to resize programatically?
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