• 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: Turning off Auto Complete feature for NSTextField
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Turning off Auto Complete feature for NSTextField


  • Subject: Re: Turning off Auto Complete feature for NSTextField
  • From: Douglas Davidson <email@hidden>
  • Date: Tue, 28 Oct 2008 08:55:42 -0700


On Oct 28, 2008, at 5:59 AM, Adil Saleem wrote:

I am encountering a small problem. I am using a simple NSTextField in my application. This textfield is editable. When user starts entering some text, the auto complete is by default ON, so on pressing escape key a list of suggestions is displayed. I don't want this feature. How can i turn off the auto complete feature for NSTextField. I couldn't find any option in Interface Builder or the documentation of NSTextField.

This is not autocompletion; this is completion upon user request, and we provide many APIs to control it. The simplest would be to use the NSControl delegate method - control:textView:completions:forPartialWordRange:indexOfSelectedItem: if you are using an NSTextField, or the NSTextView delegate method - textView:completions:forPartialWordRange:indexOfSelectedItem: if you are using an NSTextView. The proposed array of completions is passed in, and the delegate can modify this list and return it, or return nil to suppress completion. The index of the initially selected completion can also optionally be set.


Douglas Davidson

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Turning off Auto Complete feature for NSTextField (From: Adil Saleem <email@hidden>)

  • Prev by Date: Re: Subview display problem
  • Next by Date: Re: filtering a tableView from a pulldown
  • Previous by thread: Turning off Auto Complete feature for NSTextField
  • Next by thread: Re: Turning off Auto Complete feature for NSTextField
  • Index(es):
    • Date
    • Thread