Re: [SOLVED] How to make sure that end of string is visible in NSTextField
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: Wain <email@hidden>
- Date: Fri, 18 Nov 2005 18:04:32 +0000
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