• 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
[SOLVED] Re: How to make sure that end of string is visible in NSTextField
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SOLVED] Re: How to make sure that end of string is visible in NSTextField


  • Subject: [SOLVED] Re: How to make sure that end of string is visible in NSTextField
  • From: Andrei Tchijov <email@hidden>
  • Date: Fri, 18 Nov 2005 12:58:00 -0500

This is what I come up with...

...
make sure that textField is first responder
...
[[[ textField window ] fieldEditor: YES forObject: nil ] scrollRangeToVisible: NSMakeRange([[ textField stringValue ] length], 0)];
...


It works. The only side-effect is that the whole string ends-up been selected. But I can live with it.

Thanks for suggestions.

On Nov 18, 2005, at 11:30 AM, glenn andreas wrote:


On Nov 18, 2005, at 9:30 AM, Andrei Tchijov wrote:

No good. "scrollRangeToVisible:" is NSText method and NSTextField does not inherit from it.

On Nov 18, 2005, at 10:20 AM, glenn andreas wrote:

[textField scrollRangeToVisible: NSMakeRange([[textField string] length], 0)];


That'll teach me for trying to parse email before coffee...

Anyway, I'm not sure that you can easily accomplish this with an NSTextField (short of subclassing NSTextFieldCell) - I'd consider switching it to an NSTextView instead.


Glenn Andreas email@hidden <http://www.gandreas.com/> wicked fun! quadrium | build, mutate, evolve | images, textures, backgrounds, art


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: [SOLVED] Re: How to make sure that end of string is visible in NSTextField
      • From: Douglas Davidson <email@hidden>
    • Re: [SOLVED] How to make sure that end of string is visible in NSTextField
      • From: Wain <email@hidden>
References: 
 >How to make sure that end of string is visible in NSTextField (From: Andrei Tchijov <email@hidden>)
 >Re: How to make sure that end of string is visible in NSTextField (From: glenn andreas <email@hidden>)
 >Re: How to make sure that end of string is visible in NSTextField (From: Andrei Tchijov <email@hidden>)
 >Re: How to make sure that end of string is visible in NSTextField (From: glenn andreas <email@hidden>)

  • Prev by Date: Re: Key-Value Coding default accessor search implementation
  • Next by Date: NSTextView, NSImage and Anti-Aliasing
  • Previous by thread: Re: How to make sure that end of string is visible in NSTextField
  • Next by thread: Re: [SOLVED] How to make sure that end of string is visible in NSTextField
  • Index(es):
    • Date
    • Thread