• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 221
  • Last Modified:

Recognising languages

Hi Experts,

I expect this is pretty difficult and way out of my league;

I would like a rich text box to recognise different languages (e.g. XML, HTML, VB). Not extensivley but on a simple scale. What i mean by recognise is convert the text to blue if a type is used (for vb) etc...

I dont want to write loads of code to do this manually. I was wondering if there was any option for this.

I am developing a text editor and would like to give the option to edit files in other formats.

Cheers,

Tom
0
TommyTwoPints
Asked:
TommyTwoPints
  • 2
  • 2
1 Solution
 
sagacitysolutionsCommented:
Tommy,

Just a thought, If its an existing file you could determine by the file extension. If its a new file
why not allow the user to specify the format they are writing in.
0
 
TommyTwoPintsAuthor Commented:
Hi Saga,

That; i already do.

I was wondering if there was any code out there that i could place in the RichTextBox.TextChanged event that would change colours of words according to types.

I could write the code myself, i was just wondering how to approach this or if it is already avaliable somewhere.

Cheers,

Tom
0
 
RamuncikasCommented:
This could be even more usefull:
http://pietschsoft.com/Blog/Post.aspx?PostID=491
0
 
TommyTwoPintsAuthor Commented:
Thankyou for you answers;

I've found an xml file to base the styling on. I will smiliar methods shown in your second post Ramuncikas.

Thanks again
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now