Re: Partially select texts in NSTextField
Re: Partially select texts in NSTextField
- Subject: Re: Partially select texts in NSTextField
- From: Nico <email@hidden>
- Date: Tue, 13 Aug 2002 18:44:59 +0200
Well why not using :
[someTextField selectText:0];
[[someTextField window] fieldEditor:YES forObject:someTextField
setSelectedRange:someSelectionRange];
someSelectionRange is an NSRange.
You can create one using NSMakeRange().
Just a suggestion... Works fine for myself (I use that to set the insertion
point at the end of the text field)
Nico
On 13/08/02 18:16, "Tony S. Wu" <email@hidden> wrote:
>
Sort of...
>
I don't know how :P
>
Quite new to Cocoa.
>
Mind giving me more information??
>
>
Tony S. Wu
>
email@hidden
>
>
"Nope, this world ain't perfect. But at least I know it's not because of
>
me."
>
>
>
Nico at email@hidden wrote:
>
>
> Is there a reason you can't use field editor ?
>
> Nico
>
>
>
> On 13/08/02 17:32, "Tony S. Wu" <email@hidden> wrote:
>
>
>
>> I posted this question in email@hidden before, got about 3 or 4
>
>> replies.
>
>> But none of them worked.
>
>> And there wasn't follow-up anymore.
>
>> So I thought I'd ask again.
>
>> I want to be able to partially select texts in NSTextField.
>
>> And there isn't any straight-forward way to do this.
>
>> So can anyone tell me how?
>
>> Or better yet support a link to a sample code?
>
>> Thanks.
>
> _______________________________________________
>
> 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.
_______________________________________________
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.