• Home
  • Products
    • Game Engine
      • Base
      • Mathematics
      • Geometry
      • Physics
      • Particles
      • Animation
      • Graphics
      • Game
      • Game UI
    • Windows Forms
      • Docking Windows
      • Text Editor Control
  • Downloads
  • Buy
    • Overview
    • Professional
    • Indie
    • Non-Commercial
  • Support
    • Overview
    • Blog
    • Forum
    • License FAQ
    • Documentation
  • About
    • About Us
      • Services
    • Contact Us
    • Press
    • Legal Terms
      • Imprint (English)
      • Imprint (German)
Select the search type
 
  • Site
  • Web
Search
DigitalRune.com
Login |Register
NEWS News RSS Feed BLOG Blog RSS Feed FORUM News RSS Feed DOCUMENTATION DigitalRune Software on YouTube DigitalRune Software on Twitter
You are here: SupportForum

If you want to contribute to the forum discussions, please Register or Login.

SearchHome
  • 1
  • 2
  • 3
  • 4
  • 5
HomeHomeDigitalRune Sof...DigitalRune Sof...Text Editor Con...Text Editor Con...Syntax HighlightSyntax Highlight
Previous
 
Next
New Post
3/20/2011 10:29 AM
 
Jeremih
No Ranking

Joined: 3/20/2011
Posts: 4
Syntax Highlight 
Hello everybody...I wanted to make some questions about the syntax highlight...
1.It uses a XLM file?
2.Is there any example with the xml file if it uses it?

Please respond asap :)

Cheers, Jeremih.
 
New Post
3/20/2011 1:30 PM
 
MartinG
7th Level Poster

www.digitalrune.com
Joined: 10/15/2006
Posts: 448
Re: Syntax Highlight 
Hi Jeremih,

I am not sure if I understand your question.

Do you want to know whether the TextEditor controls support syntax highlighting for XML? If so: Yes it does.
If you want to try it out, just run the included SampleEditor and load an XML file.
 
New Post
3/20/2011 2:38 PM
 
Jeremih
No Ranking

Joined: 3/20/2011
Posts: 4
Re: Syntax Highlight 
well, I actually asked if I can add a syntax highlight to the control via a xml file......if it's not so easy, please tell me an other way to activate a custom syntax highlight for my control :)
 
New Post
3/20/2011 3:01 PM
 
MartinG
7th Level Poster

www.digitalrune.com
Joined: 10/15/2006
Posts: 448
Re: Syntax Highlight 
Please take a look at this thread: Link

There I have posted instructions how to add a new XML file for syntax highlighting.
 
New Post
3/20/2011 3:31 PM
 
Jeremih
No Ranking

Joined: 3/20/2011
Posts: 4
Re: Syntax Highlight 
Well now...I created the XSHD file and putted it into the resources path
now how to make it works?
 
New Post
3/20/2011 4:37 PM
 
MartinG
7th Level Poster

www.digitalrune.com
Joined: 10/15/2006
Posts: 448
Re: Syntax Highlight 

Okay, let me repeat the required steps:

  1. Create a new "XML Syntax Highlighting Definition" file (.XSHD). (Sadly there is no documentation how the XSHD files exactly work. I recommend you take an existing XSHD file an adjust the rules and keywords to match the new language.)
  2. In Visual Studio: Add the XSHD file to the project. Put it in the folder "Resources".
  3. In Visual Studio: Open the Properties Window and set the Build Action of the XSHD file to Embedded Resource.
  4. Open the file "SyntaxModes.xml" and add a new "Mode" tag for the new language.
  5. In Visual Studio: Build the project.

Let me know which step causes confusion.

 
New Post
3/20/2011 8:24 PM
 
Jeremih
No Ranking

Joined: 3/20/2011
Posts: 4
Re: Syntax Highlight 
It's all OK now thanks a lot!
But Now It shows me a error while im tryna' to display the Code Completion Window.............
This is the class code:
http://pastebin.com/8wxZJ16b

On the main form:
http://pastebin.com/vJcqmd2M

While I try to press a button, it shows me:

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
 
New Post
3/21/2011 8:29 AM
 
MartinG
7th Level Poster

www.digitalrune.com
Joined: 10/15/2006
Posts: 448
Re: Syntax Highlight 
I have quickly skimmed through the source code. But there is nothing that caught my eye.

I currently don't have any ideas what the problem could be.
 
 Page 1 of 1
Previous
 
Next
HomeHomeDigitalRune Sof...DigitalRune Sof...Text Editor Con...Text Editor Con...Syntax HighlightSyntax Highlight


DigitalRune is a trademark of Garstenauer Information Technology OG.

Garstenauer Information Technology OG
Weingartenstrasse 35, 4452 Ternberg
Austria (EUROPE)
office@digitalrune.com

Home Products Downloads Buy Support About Us
Game Engine Particles Windows Forms Professional Blog Services
Base Animation Docking Windows Indie Forum Contact Us
Mathematics Graphics Text Editor Control Non-Commercial License FAQ Press (News)
Geometry Game Documentation Legal Terms
Physics Game UI Imprint
Impressum
Copyright © 2006-2012 Garstenauer Information Technology OG Terms Of UsePrivacy Statement