NSTextField - dynamic resizing while editing
NSTextField - dynamic resizing while editing
- Subject: NSTextField - dynamic resizing while editing
- From: Eric Gorr <email@hidden>
- Date: Mon, 9 Feb 2009 10:17:18 -0500
Here is a picture of what I would to do:
http://ericgorr.net/cocoadev/outlinetable/namedparts.png
Anything outside of the green box will be clipped.
Basically, I have a NSTextField inside of a NSView which is being used
as a label for a NSImageView.
I would like to allow the user to edit the label of the image.
When the edit begins, I would like to be able to draw a focus ring or
just a black rectangle which fits exactly around the text being edited.
During editing, I would like that focus ring (or black rectangle) to
dynamically resize itself as the user adds or removes characters.
It would be nice if the text would wrap to a second line, but that
would not be a requirement.
Has anyone played around with doing this? Any sample code out there
which shows how it could be done?
I have tried to get this working with a NSTextField, but have been
unable.
Thank you.
_______________________________________________
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