We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

SubLexems & Intellisense

Thread ID:

Created:

Updated:

Platform:

Replies:

60000 Apr 26,2007 01:30 AM Mar 6,2018 11:51 PM Windows Forms 3
loading
Tags: EditControl
Eli Shalom
Asked On April 26, 2007 01:30 AM

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

Administrator [Syncfusion]
Replied On April 27, 2007 10:35 PM

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

Ricardo Gomes
Replied On March 6, 2018 07:53 AM

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

Durga Rajan [Syncfusion]
Replied On March 6, 2018 11:51 PM

Hi Ricardo, 

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

Regards, 
Durga S. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;