【问题标题】:Syncfusion (Essential Studio) - AutoComplete open after CTRL+SPACE (Buttons)Syncfusion (Essential Studio) - 自动完成在 CTRL+SPACE 后打开(按钮)
【发布时间】:2016-06-07 14:20:48
【问题描述】:

我们将 Syncfusion 的 Essential Studio 用于 Windows 窗体。 目前,我正在为使用 EditControl 的 pascal 编写一个小型代码编辑器。 IntelliSense 像 autoComplete 函数在键入我们刚刚定义的词(例如“.”)后打开,并为我们提供 API 的所有定义方法。没关系。

但我们需要在按下 Buttons CTRL + SPACE 并显示所有 api 方法后打开 AutoComplete 对话框,无论是否我们是否输入了一个词法。因为它是没有任何 OOP 的 Pascal,所以这是唯一有意义的方法。

这怎么可能?

格里兹克里斯

【问题讨论】:

    标签: vb.net autocomplete syntax-highlighting intellisense syncfusion


    【解决方案1】:

    查询:按STRG + Space后如何打开上下文选择?

    STRG +空格后请使用以下代码和示例打开ContextChoice列表

    Code [C#]:
    
      // Adds "<?" word processing for global context.
      ConfigLexem lexemId = GetConfigLexem((IConfigLexem)editControl1.Language, "STRG");
    
     lexemId.Type = FormatType.Text;
    
    
    
    // "<?" starts it`s own context. It does not have EndBlock specified, so the first unprocessed token will force parser to exit from "this"'s context.
    
      lexemId.IsComplex = true;    
    
      //To open the Context Choice after space
      ConfigLexem lexemQues = GetConfigLexem((IConfigLexem)lexemId, " ");
      lexemQues.Type = FormatType.Operator;
      // "?" can drop context choice list
      lexemQues.DropContextChoiceList = true;
      lexemQues.IsComplex = true;
    
    
    Code[VB]:
    
       ' Adds "<?" word processing for global context. 
    
     Dim lexemId As ConfigLexem = GetConfigLexem(CType(editControl1.Language, IConfigLexem), "STRG")
    
       lexemId.Type = FormatType.Text
    
       ' "<?" starts it`s own context. It does not have EndBlock specified, so the first unprocessed token will force parser to exit from "this"'s context.
    
       lexemId.IsComplex = True
    
       'To open the Context Choice after space
        Dim lexemQues As ConfigLexem = GetConfigLexem(CType(lexemId, IConfigLexem), `enter code here`" ")
        lexemQues.Type = FormatType.Operator
        ' "?" can drop context choice list
        lexemQues.DropContextChoiceList = True
        lexemQues.IsComplex = True
    

    示例 C#:http://www.syncfusion.com/downloads/support/directtrac/general/ze/EditControl_Intellisense1331161585

    示例 VB:http://www.syncfusion.com/downloads/support/directtrac/general/ze/EditControlVb-143548194

    注意:我为 Syncfusion 工作

    【讨论】:

    • 也许我写的有点误导,因为我写的是“STRG”而不是“CTRL”。我们想要的是在按下 Buttons 后打开 contextCoiceList:CTRL + SPACE。就像在VS中一样。不是在输入字符串“STRG”或“CTRL”之后。 (编辑问题)
    • 只是一个提醒,因为答案已经得到了 2 票。上面的答案是错误
    • @Chris,如果您不介意分享,正确答案是什么?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-08-11
    • 2016-10-13
    • 1970-01-01
    • 1970-01-01
    • 2020-12-14
    • 1970-01-01
    相关资源
    最近更新 更多