Solved

Recognising languages

Posted on 2006-07-17
5
208 Views
Last Modified: 2010-04-23
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
Comment
Question by:TommyTwoPints
  • 2
  • 2
5 Comments
 
LVL 8

Expert Comment

by:sagacitysolutions
ID: 17125583
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
 
LVL 3

Author Comment

by:TommyTwoPints
ID: 17125945
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
 
LVL 14

Expert Comment

by:Ramuncikas
ID: 17128352
0
 
LVL 14

Accepted Solution

by:
Ramuncikas earned 500 total points
ID: 17128367
This could be even more usefull:
http://pietschsoft.com/Blog/Post.aspx?PostID=491
0
 
LVL 3

Author Comment

by:TommyTwoPints
ID: 17128476
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now