Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using NSTextViews in custom view



Hi all,

I am trying to let the user enter text in a custom view. I basically want to display rectangles that allow for text input. To achieve this, I am using NSTextViews that I create programmatically. But I am running into two big problems:

1) Can I rotate an NSTextView? The user will be able to edit the rectangular area for the text, i.e. resize it or rotate it.

2) How can I determine whether an NSTextView just became "activated" or "deactivated". If a user clicks OUTSIDE of the view, I want it to be not enabled anymore (that means it should not display the blinking cursor anymore) and vice versa, when a user clicks it, I want to draw out its borders. How can I know if a user clicked in the view or not?

Generally, is this the right way to go? As I said before, I want to create a functionality much like that of a graphics application (like PhotoShop etc.), only a little less sophisticated.

Regards,
Michael
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.