Invoked to allow you to control the list of proposed text completions generated by text fields and other controls.
Original signature is '- (NSArray *)control:(NSControl *)control textView:(NSTextView *)textView completions:(NSArray *)words forPartialWordRange:(NSRange)charRange indexOfSelectedItem:(NSInteger *)index'
Available in Mac OS X v10.3 and later.
|C#||Visual Basic||Visual C++|
- control (NSControl)
- The control whose cell initiated the message. If the control contains multiple cells, the one that initiated the message is usually the selected cell.
- textView (NSTextView)
- The field editor of the control. You can use this parameter to get the typed text.
- words (NSArray)
- An array of NSString objects containing the potential completions. The completion strings are listed in their order of preference in the array.
- charRange (NSRange)
- The range of characters the user has already typed.
- index (NSInteger%)
- On input, an integer variable with the default value of 0. On output, you can set this value to an index in the returned array indicating which item should be selected initially. Set the value to -1 to indicate there should not be an initial selection.
- Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)