How can I select specific text in some line

SyntaxEditor for Windows Forms Forum

Posted 18 years ago by Dan Oren - Software Developer, Watchfire
Avatar
Hey

I have an http response.
I want to parse it manually in the code without defining a new language and to select the headers in Orange with bold font and the values in green. Also I would like to highlight some text in yellow and italic font (some words, not full lines). All these without defining a language but by something like we have in the RichTextBox that allows us to do this.


HTTP/1.1 302 Found
Set-Cookie: ASP.NET_SessionId=enkwakuxwsqbqcmn5chjovvq; path=/
Content-Length: 135
Server: Microsoft-IIS/5.0
Date: Tue, 07 Nov 2006 08:55:56 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Location: /bank/welcome.aspx
Cache-Control: no-cache
Pragma: no-cache
Expires: -1
Content-Type: text/html; charset=utf-8



How can I do it ?
I understood that I can use Span idicators for it but I dont know how to use it.
Could someone supply me a piece of code that show hwo to do it?

Dan

[Modified at 11/08/2006 01:52 AM]

Dan Oren

Comments (1)

Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Dan,

SyntaxEditor is not designed for WYSIWYG display like a RichTextBox. SyntaxEditor is designed to highlight a document based on patterns of text.

While you can achieve this sort of highlighting with span indicators, the more span indicators you use, the slower the display will become. Granted you probably won't see any perf difference until you add hundreds and hundreds of indicators. So if you are only doing small snippets then this might work ok.

Please look at the indicators QuickStart in the v4.0 sample project. That shows how to add span indicators and even shows how to make a custom one.


Actipro Software Support

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.