SubLexems & Intellisense

Hi,

I have a problem/misunderstading about sub lexems usgage with intellisense.

I have a block the begins with "Say Hello" and ends with ;

After typing Say Hello i am opening the context choice. This is the code use for the event

private void editControlDebugger_ContextChoiceOpen(IContextChoiceController controller)
{
IList currentLineLexems = editControlDebugger.GetLine(editControlDebugger.CurrentLine).LineLexems;
ILexem lexem = (ILexem)currentLineLexems[currentLineLexems.Count - 1];
foreach (IConfigLexem subLexem in ((IConfigLexem)lexem.Config.SubLexems[0]).SubLexems)
controller.Items.Add(subLexem.BeginBlock, "this is a tooltip");
}


But, the context choice menu appears empty.

Thanks!

BasicSample.zip

3 Replies

AD Administrator Syncfusion Team April 28, 2007 02:35 AM UTC

Hi Elisha,

It is possible to display the Context Choice after typing Say Hello using the following code snippet

private void editControl1_ContextChoiceOpen(Syncfusion.Windows.Forms.Edit.Interfaces.IContextChoiceController controller)
{
controller.UseAutocomplete=false;
IList currentLineLexems = editControl1.GetLine(editControl1.CurrentLine).LineLexems;
ILexem lexem = (ILexem)currentLineLexems[currentLineLexems.Count - 1];
foreach (IConfigLexem subLexem in lexem.Config.SubLexems)
controller.Items.Add(subLexem.BeginBlock, "this is a tooltip");
}

I have attached a sample that illustrates this. Let me know if this meets your requirements.

rel='nofollow' href="http://websamples.syncfusion.com/samples/Edit/60000/main.htm">http://websamples.syncfusion.com/samples/Edit/60000/main.htm

Thank you for your patience.

Regards,
Ebenezer.P


RG Ricardo Gomes replied to Administrator March 6, 2018 12:53 PM UTC

Hi Elisha,

It is possible to display the Context Choice after typing Say Hello using the following code snippet

private void editControl1_ContextChoiceOpen(Syncfusion.Windows.Forms.Edit.Interfaces.IContextChoiceController controller)
{
controller.UseAutocomplete=false;
IList currentLineLexems = editControl1.GetLine(editControl1.CurrentLine).LineLexems;
ILexem lexem = (ILexem)currentLineLexems[currentLineLexems.Count - 1];
foreach (IConfigLexem subLexem in lexem.Config.SubLexems)
controller.Items.Add(subLexem.BeginBlock, "this is a tooltip");
}

I have attached a sample that illustrates this. Let me know if this meets your requirements.

rel='nofollow' href="http://websamples.syncfusion.com/samples/Edit/60000/main.htm">http://websamples.syncfusion.com/samples/Edit/60000/main.htm

Thank you for your patience.

Regards,
Ebenezer.P

accept


DR Durga Rajan Syncfusion Team March 7, 2018 04:51 AM UTC

Hi Ricardo, 

Thanks for the update. Please let us know whether you need any technical assistance in this. 

Regards, 
Durga S. 


Loader.
Up arrow icon