• 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: Vertical alignment in NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Vertical alignment in NSTextView


  • Subject: Re: Vertical alignment in NSTextView
  • From: "Rimas M." <email@hidden>
  • Date: Wed, 04 May 2011 10:05:00 +0300

Hello Andrew,

Nope - that will not going to work, because container inset is expressed as
a size and inset is set equally from both sizes: inset.width for left and
right "margins", inset.height for top and bottom "margins".

But overwriting NSTextView's -(NSPoint)textContainerOrigin might do the
trick. Going to try that.

Regards,

Rimas M.

On Tue, May 3, 2011 at 7:05 PM, Andrew Glushchenko <email@hidden>
wrote:
> Hello, Rimas
> You can change the inset of the NSTextContainer associated with the
> NSTextView for this purpose. See setTextContainerInset method of
NSTextView.
> 2011/5/3 Rimas M. <email@hidden>
>>
>> Hello,
>>
>> I continue my fight with cocoa text system :)) At the moment I am
>> loosing..
>>
>> Now I am trying to implement vertical text alignment in NSTextView. If
>> I would need only drawing, would be quite easy. But I need to maintain
>> an editing capability.
>>
>> The thing I am talking about is very similar (or even the same) to the
>> text writing inside shape (rectangle) using Keynote: insert rectangle
>> shape, double click it ant write some text. Using inspector (Text tab)
>> you can choose between top, middle and bottom vertical alignment.
>>
>> I am almost sure, that I need to subclass and overwrite some stuff
>> from either NSLayoutManager or NSATSTypesetter. Just not sure which
>> exact... Any thoughts?
>>
>> Best Regards,
>>
>> Rimas M.
>> _______________________________________________
>>
>> 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
>
>
_______________________________________________

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: 
 >Vertical alignment in NSTextView (From: "Rimas M." <email@hidden>)
 >Re: Vertical alignment in NSTextView (From: Andrew Glushchenko <email@hidden>)

  • Prev by Date: Re: Instruments and leaks in a DRM framework
  • Next by Date: Re: Interruption of NSTreeController's selectionIndexPaths updating after mouseDown
  • Previous by thread: Re: Vertical alignment in NSTextView
  • Next by thread: objects and "global / shared data"
  • Index(es):
    • Date
    • Thread