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.
Syncfusion Feedback

context choice help

Thread ID:

Created:

Updated:

Platform:

Replies:

55411 Jan 30,2007 02:27 AM UTC Feb 5,2007 11:29 PM UTC Windows Forms 7
loading
Tags: EditControl
Administrator [Syncfusion]
Asked On January 30, 2007 02:27 AM UTC

Hi,

I want to drop context choice for a string that begins and ends with the ! character. For example, !hello world! should be treated as its own type (with color). I can get the colouring working but when I add context choice list support, the drop down doesn't come after the first key press (!). Can this be done??? this is what I tried so far:

lexem BeginBlock="!" EndBlock="!" Type="Comment" DropContextChoiceList="true"
IsComplex="true" OnlyLocalSublexems="true"
SubLexems
lexem BeginBlock="\w*" IsBeginRegex="true" Type="Comment"
SubLexems
lexem

please help

sal

Purusothaman R [Syncfusion]
Replied On January 31, 2007 01:42 AM UTC

Hi Sal,

Thanks for using Syncfusion Products.

You can use the given below lexems to achieve the required behavior.









I have attached a sample. Please look in to the sample and let me know whether this is what you needed.

Sample.zip

Thanks,
Purusothaman.R

Purusothaman R [Syncfusion]
Replied On January 31, 2007 01:50 AM UTC

Hi Sal,

Sorry for the inconvenience.

The lexems configuration were not displayed properly in my previous update.

So kindly look in to the attached sample and let me know, if this is the requirement.

Thanks,
Purusothaman.R

Administrator [Syncfusion]
Replied On February 2, 2007 12:34 AM UTC

Thanks Purusothaman. That worked.

When I press "!", the context choice drops down immediately now which is great. But when I continue typing the subsequent characters are not treated as a comment until I type the ending "!". Once I hit the final "!" the complete string becomes a comment. I need the characters to be considered a comment as the user types. I tried some stuff with ContinueBlock's but couldn't get it to work.

Is it possible to have the immediate context choice drop behavior AND also allow subsequent characters to be considered a comment as they are typed AND have the comment end with a closing "!" character? Please help.

-Sal

Purusothaman R [Syncfusion]
Replied On February 2, 2007 01:27 AM UTC

Hi Sal,

We are working on this issue and I will let you know the solution for this within a day.

Thanks for your patience.

Regards,
Purusothaman.R

Purusothaman R [Syncfusion]
Replied On February 2, 2007 03:38 PM UTC

Hi Sal,

It is possible to obtain the feature requested by you. I have attached the modified Config file with the changes to get this behavior.

Please use this Config file and let me know whether this is what you actually needed.

Modified Config

Thanks for your patience.

Regards,
Purusothaman.R

Administrator [Syncfusion]
Replied On February 5, 2007 10:58 PM UTC

Thanks Puru. That works great!

I'd like to understand how this works and so far have found the documentation on lexem configuration rather weak.

Could you explain the subtleties of your first lexem compared to the second one? This isn't obvious to me.

thanks,
Sal


>Hi Sal,

It is possible to obtain the feature requested by you. I have attached the modified Config file with the changes to get this behavior.

Please use this Config file and let me know whether this is what you actually needed.

Modified Config

Thanks for your patience.

Regards,
Purusothaman.R

Purusothaman R [Syncfusion]
Replied On February 5, 2007 11:29 PM UTC

Hi Sal,

The first "!" is the beginning of a block and so it its marked as BeginBlock and DropContextChoiceList is made True for it, since the Context Choice should be displayed for "!". IsComplex attribute is made True to mark this lexem as complex having some sub lexems.

Then everything that follows the ! should be the part of the Comment type. So the Regex "\w*" is added. Again "!" is added as a Sub Lexem to end the comment type. This is like a kind of workaround for this, because usually when IsComplex is True, DropContextChoiceList should be false.

Thanks for using Syncfusion Products.

Best Regards,
Purusothaman.R

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.

Warning Icon 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.Close Icon

;