AutocompleteMenuNS.TextBoxWrapper.Create C# (CSharp) Method

Create() public static method

public static Create ( Control targetControl ) : TextBoxWrapper
targetControl System.Windows.Forms.Control
return TextBoxWrapper
        public static TextBoxWrapper Create(Control targetControl)
        {
            var result = new TextBoxWrapper(targetControl);

            if (result.selectedText == null || result.selectionLength == null || result.selectionStart == null ||
                result.getPositionFromCharIndex == null)
                return null;

            return result;
        }

Usage Example

Example #1
0
 protected void OnWrapperNeeded(WrapperNeededEventArgs args)
 {
     if (WrapperNeeded != null)
     {
         WrapperNeeded(this, args);
     }
     if (args.Wrapper == null)
     {
         if (args.TargetControl is ScintillaNET.Scintilla)
         {
             args.Wrapper = ScintillaWrapper.Create((ScintillaNET.Scintilla)args.TargetControl);
         }
         else
         {
             args.Wrapper = TextBoxWrapper.Create(args.TargetControl);
         }
     }
 }
All Usage Examples Of AutocompleteMenuNS.TextBoxWrapper::Create