MonobjcMonobjc Documented Class Library
ControlTextViewCompletionsForPartialWordRangeIndexOfSelectedItemMessage Method (control, textView, words, charRange, index)
NamespacesMonobjc.AppKitNSControl..::..NSControlTextEditingDelegateEventDispatcherControlTextViewCompletionsForPartialWordRangeIndexOfSelectedItemMessage(NSControl, NSTextView, NSArray, NSRange, NSInteger%)

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.

Declaration Syntax
C#Visual BasicVisual C++
public NSArray ControlTextViewCompletionsForPartialWordRangeIndexOfSelectedItemMessage(
	NSControl control,
	NSTextView textView,
	NSArray words,
	NSRange charRange,
	ref NSInteger index
)
Public Function ControlTextViewCompletionsForPartialWordRangeIndexOfSelectedItemMessage ( _
	control As NSControl, _
	textView As NSTextView, _
	words As NSArray, _
	charRange As NSRange, _
	ByRef index As NSInteger _
) As NSArray
public:
NSArray^ ControlTextViewCompletionsForPartialWordRangeIndexOfSelectedItemMessage(
	NSControl^ control, 
	NSTextView^ textView, 
	NSArray^ words, 
	NSRange charRange, 
	NSInteger% index
)
Parameters
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.
Return Value
An array of NSString objects containing the list of completions to use in place of the array in the words parameter. The returned array should list the completions in their preferred order
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)

Assembly: Monobjc.AppKit (Module: Monobjc.AppKit)