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

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


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

Thanks for suggestion, I discovered it few seconds after I sent my last e-mail. It works very nicely.

On Nov 18, 2005, at 1:04 PM, Wain wrote:


On 18 Nov 2005, at 17:58, Andrei Tchijov wrote:

This is what I have come up with...

...
make sure that textField is the 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 being selected. But I can live with it.

You shouldn't have to live with it, try using the field editor (NSText) method "- (void)setSelectedRange:(NSRange)aRange" :-)


Wain




___________________________________________________________To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com

_______________________________________________ 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
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>)
 >[SOLVED] Re: How to make sure that end of string is visible in NSTextField (From: Andrei Tchijov <email@hidden>)
 >Re: [SOLVED] How to make sure that end of string is visible in NSTextField (From: Wain <email@hidden>)

  • Prev by Date: Announcement .Mac SDK 2.0 (Developer Preview 2)
  • Next by Date: Re: NSImageView does not update on setNeedsDisplay
  • Previous by thread: Re: [SOLVED] How to make sure that end of string is visible in NSTextField
  • Next by thread: Re: [SOLVED] Re: How to make sure that end of string is visible in NSTextField
  • Index(es):
    • Date
    • Thread