• 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: Controlling NSTextView's ruler accessory view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Controlling NSTextView's ruler accessory view


  • Subject: Re: Controlling NSTextView's ruler accessory view
  • From: Steve Mykytyn <email@hidden>
  • Date: Tue, 13 Jan 2004 10:34:07 -0800

I think this may be getting a little edgy with the HI guidelines, but
my approach was to let the NSTextView put up whatever it wanted in the
accessory view, but to get it rid of it once the user stopped editing
the text in the NSTextView

In your custom NSView, run something like the following when the user
stops editing the NSTextView...

[[[self enclosingScrollView] horizontalRulerView]
setClientView:self];
[[[self enclosingScrollView] horizontalRulerView]
setAccessoryView:nil];
[[[self enclosingScrollView] horizontalRulerView]
setReservedThicknessForAccessoryView:0.0];
[[[self enclosingScrollView] horizontalRulerView]
setReservedThicknessForMarkers:0.0];
[self updateRulers];

You do get the "jumpy" effect when you go in and out of any NSTextViews
embedded in your custom view, but at least you don't have the
NSTextView accessories hanging around when they're not appropriate



> From: Chris Anderson <email@hidden>
> Date: January 12, 2004 4:16:54 PM PST
> To: email@hidden
> Subject: Controlling NSTextView's ruler accessory view
>
>
> My custom NSView sometimes makes an NSTextView subview. If the
> superview is displaying rulers, NSTextView installs its horizontal
> ruler accessory view the first time it gets instantiated. This
> accessory view uses a lot of space and when it shoves everything else
> down it's kind of distracting, so two questions:
>
> 1) How do I turn NSTextView's ruler accessory view on and off? and
> 2) Can I install/display the ruler accessory view without
> instantiating an NSTextView?
>
> Not at all obvious from searching the docs... thanks
>
> Regards,
>
> ---Chris
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: memory management
  • Next by Date: [help!] a strange crash (to me)...
  • Previous by thread: Re: Controlling NSTextView's ruler accessory view
  • Next by thread: Spell-checking service
  • Index(es):
    • Date
    • Thread