Capitalization

Is there a way to have the editor automatically capitalize the keys words as VS 2005 IDE does in VB.NET?

4 Replies

AD Administrator Syncfusion Team March 20, 2007 02:43 AM UTC

Hi Perry,

It is possible to automatically capitalize the key words using the OnCustomDraw event. I have attached a sample that illustrates this. Let me know if this meets your requirements.

Thank you for your patience.

Regards,
Ebenezer.P

Sample


PE Perry March 22, 2007 06:51 AM UTC

Interesting. This capitalizes the first character only. I was looking more for having the caps looks like the declaration in the config file.
For example my config file has this line:

So I expect if I type "isnot" it will convert to "IsNot". In VB.NET key words are not always capitalized with first letter only.

Anyway you example gave me an idea. I could parse the config file in the OnCustomDraw and replace the key word with the one from the config file myself. A lot of headache when I see no reason why the control shouldn't do this by default. Users can then use the config file to control this.

>Hi Perry,

It is possible to automatically capitalize the key words using the OnCustomDraw event. I have attached a sample that illustrates this. Let me know if this meets your requirements.

Thank you for your patience.

Regards,
Ebenezer.P

Sample


PE Perry March 22, 2007 07:14 AM UTC

I want to inherit from EditControl so that I can put this caps feature in a custom control rather than in an event. This is because I am using the edit control in many areas and don't want to maintain the event in all places. However I don't see on override "OnCustomDraw". Only the event "OnCustomDraw". Is it called something else? If not what method should I override?

Thanks
Perry

>Hi Perry,

It is possible to automatically capitalize the key words using the OnCustomDraw event. I have attached a sample that illustrates this. Let me know if this meets your requirements.

Thank you for your patience.

Regards,
Ebenezer.P

Sample


AD Administrator Syncfusion Team March 23, 2007 02:22 AM UTC

Hi Perry,

It is possible to capitalize like the declaration in the configuration file using the OnCustomDraw event. It is also possible to use this feature in several EditControl's. I have attached a sample that illustrates this. Let me know if this meets your requirements.

Thank you for your patience.

Regards,
Ebenezer.P

Sample

Loader.
Up arrow icon